providers/proxy: fix duplicate proxy set default

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-08-18 21:10:35 +02:00
parent 514c48a986
commit 0cc83c23c4
3 changed files with 5 additions and 9 deletions

View file

@ -477,7 +477,7 @@ class OAuthFulfillmentStage(StageView):
GrantTypes.HYBRID,
]:
code = self.params.create_code(self.request)
code.save(force_insert=True)
code.save()
if self.params.response_mode == ResponseMode.QUERY:
query_params = parse_qs(uri.query)

View file

@ -9,9 +9,3 @@ class AuthentikProviderProxyConfig(ManagedAppConfig):
label = "authentik_providers_proxy"
verbose_name = "authentik Providers.Proxy"
default = True
def reconcile_trigger_proxy_set_defaults(self):
"""Trigger set_defaults task"""
from authentik.providers.proxy.tasks import proxy_set_defaults
proxy_set_defaults.delay()

View file

@ -148,9 +148,11 @@ func NewApplication(p api.ProxyOutpostConfig, c *http.Client, cs *ak.CryptoStore
mux.Use(sentryhttp.New(sentryhttp.Options{}).Handle)
mux.Use(func(inner http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if _, set := r.URL.Query()[CallbackSignature]; set {
if strings.EqualFold(r.URL.Query().Get(CallbackSignature), "true") {
a.log.Debug("handling OAuth Callback from querystring signature")
a.handleAuthCallback(w, r)
} else if _, set := r.URL.Query()[LogoutSignature]; set {
} else if strings.EqualFold(r.URL.Query().Get(LogoutSignature), "true") {
a.log.Debug("handling OAuth Logout from querystring signature")
a.handleSignOut(w, r)
} else {
inner.ServeHTTP(w, r)