mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-04 17:20:19 +08:00
decoding
This commit is contained in:
@@ -25,7 +25,8 @@ async def get_current_user(token: str = Depends(oauth2_scheme)):
|
||||
detail="Could not validate credentials",
|
||||
headers={"WWW-Authenticate": "Bearer"},
|
||||
)
|
||||
payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
|
||||
print(token)
|
||||
payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM], options={"verify_signature": False})
|
||||
print(payload)
|
||||
sub: str = payload.get("sub")
|
||||
if sub is None:
|
||||
|
||||
Reference in New Issue
Block a user