Skip to content

Commit

Permalink
update login encrypt pwd
Browse files Browse the repository at this point in the history
  • Loading branch information
HurinHu committed Sep 1, 2023
1 parent a84f86e commit 21960f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions igapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def encrypted_password(self, key, timestamp, password):

def login(self):
response = self.s.get(self.config.endpoint+'/session/encryptionKey', headers={'X-IG-API-KEY': self.api_key, 'Content-Type': 'application/json; charset=UTF-8', 'Accept': 'application/json; charset=UTF-8'})
data = response.json()
encryption_key = data['encryptionKey']
timestamp = data['timeStamp']
encrypted_password = self.encrypted_password(encryption_key,timestamp,self.password)
Expand Down

0 comments on commit 21960f2

Please sign in to comment.