File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
carbonserver/carbonserver/api/services Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def __init__(self, error_if_not_found=False):
6666 """
6767 self .error_if_not_found = error_if_not_found
6868
69- def __call__ (
69+ async def __call__ (
7070 self ,
7171 auth_user_cookie : Optional [FiefUserInfo ] = Depends (
7272 fief_auth_cookie .current_user (optional = True )
@@ -85,6 +85,11 @@ def __call__(
8585 algorithms = ["HS256" , "RS256" ],
8686 )
8787 elif bearer_token is not None :
88+ if settings .environment != "develop" :
89+ try :
90+ await fief .validate_access_token (bearer_token .credentials )
91+ except Exception :
92+ raise HTTPException (status_code = 401 , detail = "Invalid token" )
8893 # cli user using fief token
8994 self .auth_user = jwt .decode (
9095 bearer_token .credentials ,
You can’t perform that action at this time.
0 commit comments