From 6036d883924ea9fb65fcce9a8e85ebd17325c79d Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 31 Oct 2021 22:25:42 +0100 Subject: [PATCH] providers/proxy: allow configuring of additional scope mappings for proxy closes #1255 Signed-off-by: Jens Langhammer --- authentik/providers/proxy/models.py | 2 +- .../providers/proxy/ProxyProviderForm.ts | 35 ++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/authentik/providers/proxy/models.py b/authentik/providers/proxy/models.py index a8dee92ba..80db22d49 100644 --- a/authentik/providers/proxy/models.py +++ b/authentik/providers/proxy/models.py @@ -138,7 +138,7 @@ class ProxyProvider(OutpostModel, OAuth2Provider): SCOPE_AK_PROXY, ] ) - self.property_mappings.set(scopes) + self.property_mappings.add(*list(scopes)) self.redirect_uris = _get_callback_url(self.external_host) def __str__(self): diff --git a/web/src/pages/providers/proxy/ProxyProviderForm.ts b/web/src/pages/providers/proxy/ProxyProviderForm.ts index 000d072b7..c51e99c5a 100644 --- a/web/src/pages/providers/proxy/ProxyProviderForm.ts +++ b/web/src/pages/providers/proxy/ProxyProviderForm.ts @@ -14,6 +14,7 @@ import { CryptoApi, FlowsApi, FlowsInstancesListDesignationEnum, + PropertymappingsApi, ProvidersApi, ProxyMode, ProxyProvider, @@ -320,7 +321,7 @@ export class ProxyProviderFormPage extends ModelForm { - ${t`Advanced protocol settings`} + ${t`Advanced protocol settings`}
+ + +

+ ${t`Additional scope mappings, which are passed to the proxy.`} +

+

+ ${t`Hold control/command to select multiple items.`} +

+