3
3
from __future__ import annotations
4
4
5
5
from passageidentity .auth import Auth
6
- from passageidentity .errors import PassageError
7
6
from passageidentity .user import User
8
7
9
8
@@ -13,16 +12,17 @@ class Passage:
13
12
COOKIE_AUTH = 1
14
13
HEADER_AUTH = 2
15
14
16
- def __init__ (self , app_id : str , api_key : str = "" , auth_strategy : int = COOKIE_AUTH ) -> None :
15
+ def __init__ (self , app_id : str , api_key : str ) -> None :
17
16
"""Initialize a new Passage instance."""
18
17
if not app_id :
19
- msg = "A Passage app ID is required. Please include { app_id=YOUR_APP_ID, api_key=YOUR_API_KEY} ."
20
- raise PassageError (msg )
18
+ msg = "A Passage app ID is required. Please include ( app_id=YOUR_APP_ID, api_key=YOUR_API_KEY) ."
19
+ raise ValueError (msg )
21
20
22
- self .app_id : str = app_id
23
- self .passage_apikey : str = api_key
24
- self .auth_strategy : int = auth_strategy
25
- self .request_headers = {"Authorization" : f"Bearer { api_key } " }
21
+ if not api_key :
22
+ msg = "A Passage API key is required. Please include (app_id=YOUR_APP_ID, api_key=YOUR_API_KEY)."
23
+ raise ValueError (msg )
26
24
27
- self .auth = Auth (app_id , self .request_headers )
28
- self .user = User (app_id , self .request_headers )
25
+ request_headers = {"Authorization" : f"Bearer { api_key } " }
26
+
27
+ self .auth = Auth (app_id , request_headers )
28
+ self .user = User (app_id , request_headers )
0 commit comments