File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,18 +10,9 @@ def __init__(self):
1010 # so you will need to encrypt it from their webapp
1111 def authenticate (self , username , password ):
1212 url = f'{ self .base_url } /v1/authent'
13- headers = {
14- 'User-Agent' : 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0' ,
15- 'Accept' : 'application/json, text/plain, */*' ,
16- 'Accept-Language' : 'en-US,en;q=0.5' ,
17- 'Content-Type' : 'application/json;charset=utf-8' ,
18- 'Sec-Fetch-Dest' : 'empty' ,
19- 'Sec-Fetch-Mode' : 'cors' ,
20- 'Sec-Fetch-Site' : 'same-origin'
21- }
2213 data = {'username' : username , 'password' : password }
2314
24- response = self .session .post (url , headers = headers , json = data )
15+ response = self .session .post (url , json = data )
2516
2617 if response .status_code != 200 :
2718 raise Exception (f'Authentication failed: { response .status_code } ' )
You can’t perform that action at this time.
0 commit comments