File tree Expand file tree Collapse file tree 4 files changed +16
-11
lines changed
Expand file tree Collapse file tree 4 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 1+ from .bearer_auth import BearerAuth
2+
3+ __all__ = ["BearerAuth" ]
Original file line number Diff line number Diff line change 1+ import httpx
2+
3+ class BearerAuth (httpx .Auth ):
4+ def __init__ (self , token : str ):
5+ self .token = token
6+
7+ def auth_flow (self , request ):
8+ request .headers ['Authorization' ] = f"Bearer { self .token } "
9+ yield request
Original file line number Diff line number Diff line change 11from .server_client import ServerClient
2+ from .my_account_client import MyAccountClient
23
3- __all__ = ["ServerClient" ]
4+ __all__ = ["ServerClient" , "MyAccountClient" ]
Original file line number Diff line number Diff line change 11
22import httpx
3-
3+ from auth0_server_python . auth_schemes . bearer_auth import BearerAuth
44from auth0_server_python .auth_types import (
55 ConnectAccountRequest ,
66 ConnectAccountResponse ,
@@ -100,12 +100,4 @@ async def complete_connect_account(
100100 "connect_account_error" ,
101101 f"Connected Accounts complete request failed: { str (e ) or 'Unknown error' } " ,
102102 e
103- )
104-
105- class BearerAuth (httpx .Auth ):
106- def __init__ (self , token : str ):
107- self .token = token
108-
109- def auth_flow (self , request ):
110- request .headers ['Authorization' ] = f"Bearer { self .token } "
111- yield request
103+ )
You can’t perform that action at this time.
0 commit comments