Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
val500 committed Jan 23, 2025
1 parent 8462860 commit 81435a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/src/api/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,9 +806,8 @@ def generate_token(allowed_resources, secret_key):
"exp": expiration_time,
"iat": datetime.now(timezone.utc), # Issued at time
"sub": "access_token",
"permissions": {},
"permissions": allowed_resources,
}
token_payload.get("permissions").update(allowed_resources)
token = jwt.encode(token_payload, secret_key, algorithm="HS256")
return token

Expand Down

0 comments on commit 81435a8

Please sign in to comment.