File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,13 @@ def _PKCE_verify(self,
361361 :param authentication_request: the code_verfier to check against the code challenge.
362362 :returns: whether the code_verifier is what was expected given the cc_cm
363363 """
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+
364371 code_challenge_method = authentication_request ['code_challenge_method' ]
365372 if code_challenge_method == 'plain' :
366373 return authentication_request ['code_challenge' ] == token_request ['code_verifier' ]
You can’t perform that action at this time.
0 commit comments