forked from oscar.krause/fastapi-dls
code styling
This commit is contained in:
parent
03089e82e5
commit
35e5d70bba
@ -167,8 +167,7 @@ async def token(request: Request):
|
|||||||
payload = jwt.decode(token=j['auth_code'], key=key)
|
payload = jwt.decode(token=j['auth_code'], key=key)
|
||||||
|
|
||||||
# validate the code challenge
|
# validate the code challenge
|
||||||
if payload['challenge'] != b64encode(sha256(j['code_verifier'].encode('utf-8')).digest()).rstrip(b'=').decode(
|
if payload['challenge'] != b64encode(sha256(j['code_verifier'].encode('utf-8')).digest()).rstrip(b'=').decode('utf-8'):
|
||||||
'utf-8'):
|
|
||||||
raise HTTPException(status_code=403, detail='expected challenge did not match verifier')
|
raise HTTPException(status_code=403, detail='expected challenge did not match verifier')
|
||||||
|
|
||||||
cur_time = datetime.utcnow()
|
cur_time = datetime.utcnow()
|
||||||
|
Loading…
Reference in New Issue
Block a user