INNER CODE UNIT · Python
get_config
Yacht-sh/Yacht · backend/api/main.py:71
def get_config():
return jwtSettings()
@AuthJWT.token_in_denylist_loader
def check_if_token_in_denylist(decrypted_token):
db = SessionLocal()
try:
jti = decrypted_token["jti"]
entry = db.query(TokenBlacklist).filter(TokenBlacklist.jti == jti).first()
return entry is not None
finally:
db.close()
@app.exception_handler(AuthJWTException)
def authjwt_exception_handler(request: Request, exc: AuthJWTException):
status_code = exc.status_code