From 885fcff4953ac25bf61e3c42f86ef5ca6512bd0e Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 27 Dec 2020 14:17:40 +0100 Subject: [PATCH] providers/oauth2: add grant_types_supported to discovery endpoint --- authentik/providers/oauth2/views/provider.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/authentik/providers/oauth2/views/provider.py b/authentik/providers/oauth2/views/provider.py index a1794f4bf..fb0966670 100644 --- a/authentik/providers/oauth2/views/provider.py +++ b/authentik/providers/oauth2/views/provider.py @@ -8,7 +8,7 @@ from structlog import get_logger from authentik.core.models import Application from authentik.providers.oauth2.constants import ACR_AUTHENTIK_DEFAULT, SCOPE_OPENID -from authentik.providers.oauth2.models import OAuth2Provider, ScopeMapping +from authentik.providers.oauth2.models import GrantTypes, OAuth2Provider, ScopeMapping LOGGER = get_logger() @@ -55,6 +55,11 @@ class ProviderInfoView(View): kwargs={"application_slug": provider.application.slug}, ) ), + "grant_types_supported": [ + GrantTypes.AUTHORIZATION_CODE, + GrantTypes.IMPLICIT, + GrantTypes.HYBRID, + ], "id_token_signing_alg_values_supported": [provider.jwt_alg], # See: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes "subject_types_supported": ["public"],