summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749/endpoints
diff options
context:
space:
mode:
authorJonathan Huot <jonathan.huot@thomsonreuters.com>2018-11-30 15:12:04 +0100
committerJonathan Huot <jonathan.huot@thomsonreuters.com>2018-11-30 15:12:04 +0100
commitcf3cf407be774405f66188219eb1653c723e294b (patch)
treea356381dfd5cf772bea8b9f1beef1865d0cfcc2f /oauthlib/oauth2/rfc6749/endpoints
parent01b3c4c20178b292d470eead153b91feaa05c057 (diff)
downloadoauthlib-cf3cf407be774405f66188219eb1653c723e294b.tar.gz
Add OAuth2 Provider Server Metadata for PKCE.
Diffstat (limited to 'oauthlib/oauth2/rfc6749/endpoints')
-rw-r--r--oauthlib/oauth2/rfc6749/endpoints/metadata.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/oauthlib/oauth2/rfc6749/endpoints/metadata.py b/oauthlib/oauth2/rfc6749/endpoints/metadata.py
index 6d77b9f..6873334 100644
--- a/oauthlib/oauth2/rfc6749/endpoints/metadata.py
+++ b/oauthlib/oauth2/rfc6749/endpoints/metadata.py
@@ -104,6 +104,8 @@ class MetadataEndpoint(BaseEndpoint):
self.validate_metadata(claims, "response_types_supported", is_required=True, is_list=True)
self.validate_metadata(claims, "response_modes_supported", is_list=True)
if "code" in claims["response_types_supported"]:
+ claims.setdefault("code_challenge_methods_supported",
+ list(endpoint._response_types["code"]._code_challenge_methods.keys()))
self.validate_metadata(claims, "code_challenge_methods_supported", is_list=True)
self.validate_metadata(claims, "authorization_endpoint", is_required=True, is_url=True)