Skip to content

Commit 9faec70

Browse files
authored
Merge pull request #73 from ctriant/fix-supports
Fix returned _supports on token endpoint
2 parents 55d16fc + 08f2fd5 commit 9faec70

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/idpyoidc/server/oauth2/token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,4 @@ def process_request(self, request: Optional[Union[Message, dict]] = None, **kwar
189189
return resp
190190

191191
def supports(self):
192-
return {"grant_types_supported": list(self.grant_type_helper.keys())}
192+
return self._supports

src/idpyoidc/server/oidc/token.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,21 @@ class Token(token.Token):
2626
name = "token"
2727
default_capabilities = None
2828

29+
helper_by_grant_type = {
30+
"authorization_code": AccessTokenHelper,
31+
"refresh_token": RefreshTokenHelper,
32+
"urn:ietf:params:oauth:grant-type:token-exchange": TokenExchangeHelper,
33+
}
34+
2935
_supports = {
3036
"token_endpoint_auth_methods_supported": [
3137
"client_secret_post",
3238
"client_secret_basic",
3339
"client_secret_jwt",
3440
"private_key_jwt",
3541
],
36-
"token_endpoint_auth_signing_alg_values_supported": claims.get_signing_algs,
42+
"token_endpoint_auth_signing_alg_values_supported": claims.get_signing_algs(),
43+
"grant_types_supported": list(helper_by_grant_type.keys())
3744
}
3845

3946
helper_by_grant_type = {

0 commit comments

Comments
 (0)