Skip to content

Commit

Permalink
docs(readme): Updated code and note for session_alive usage
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Sep 4, 2023
1 parent 1f58545 commit 6583a31
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,17 @@ print("Logging into ERP for:", creds.ROLL_NUMBER)

while True:
if not erp.session_alive(session):
erp.login(headers, session, ERPCREDS=erpcreds, LOGGING=True)
_, ssoToken = erp.login(headers, session, ERPCREDS=erpcreds, LOGGING=True)
else:
print("Session is alive.")
ssoToken = session.cookies.get('ssoToken')
sessionToken = session.cookies.get('JSID#/IIT_ERP3')

# Traverse ERP further using ssoToken

time.sleep(2)
```
> **Note** This is merely a Proof of Concept example; this exact functionality has been integrated into the login function itself from version **2.1.0** onwards.
> **Note** This is merely a Proof of Concept example; this exact functionality has been integrated into the login function itself from version **2.3.1** onwards.
<div id="ssotoken-alive"></div>

Expand Down

0 comments on commit 6583a31

Please sign in to comment.