mirror of
https://github.com/ChrispyBacon-dev/DockFlare.git
synced 2026-04-28 11:49:34 +00:00
15 lines
380 B
Python
15 lines
380 B
Python
import jwt
|
|
from app.config import JWT_PUBLIC_KEY, JWT_ALGORITHM, JWT_ISSUER, JWT_AUDIENCE
|
|
|
|
def verify_jwt(token):
|
|
try:
|
|
decoded = jwt.decode(
|
|
token,
|
|
JWT_PUBLIC_KEY,
|
|
algorithms=[JWT_ALGORITHM],
|
|
issuer=JWT_ISSUER,
|
|
audience=JWT_AUDIENCE
|
|
)
|
|
return decoded
|
|
except Exception:
|
|
return None
|