File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1+ from functools import lru_cache
12from typing import Annotated , Any
23
34from fastapi import Depends , HTTPException , Request
910from src .users .auth0 import get_or_create_user_from_auth0 , get_user_by_auth0_id
1011from src .users .models import User
1112
12- from functools import lru_cache
13-
1413security = HTTPBearer ()
1514
1615
1716# Initialize Auth0Service
1817# This is a singleton instance of Auth0Service
1918# to be reused across requests.
20- @lru_cache ()
19+ @lru_cache
2120def get_auth0_service () -> Auth0Service :
2221 """
2322 Provides a singleton Auth0Service instance using lru_cache.
@@ -50,7 +49,6 @@ async def get_current_user_claims(
5049async def get_current_user_info (
5150 request : Request ,
5251 token : Annotated [str , Depends (get_token_from_header )],
53- claims : Annotated [dict [str , Any ], Depends (get_current_user_claims )],
5452 auth_service : Annotated [Auth0Service , Depends (get_auth0_service )],
5553) -> UserInfo :
5654 """
Original file line number Diff line number Diff line change 1- from typing import Any , TypedDict
21import logging
2+ from typing import Any , TypedDict
33
4+ import httpx
45from authlib .integrations .starlette_client import OAuth
56from authlib .jose import jwt
67from fastapi import HTTPException , Request
78from starlette .responses import RedirectResponse
8- import httpx
99
1010from src .core .config import settings
1111
You can’t perform that action at this time.
0 commit comments