We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 198814e commit 23ab1c4Copy full SHA for 23ab1c4
1 file changed
src/pyop/provider.py
@@ -361,6 +361,13 @@ def _PKCE_verify(self,
361
:param authentication_request: the code_verfier to check against the code challenge.
362
:returns: whether the code_verifier is what was expected given the cc_cm
363
"""
364
+ if not 'code_verifier' in token_request:
365
+ return False
366
+
367
+ if not 'code_challenge_method' in authentication_request:
368
+ raise InvalidTokenRequest("A code_challenge and code_verifier have been supplied"
369
+ "but missing code_challenge_method in authentication_request", token_request)
370
371
code_challenge_method = authentication_request['code_challenge_method']
372
if code_challenge_method == 'plain':
373
return authentication_request['code_challenge'] == token_request['code_verifier']
0 commit comments