Coverage for webapp/authentication.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-27 22:07 +0000

1def is_authenticated(session): 

2 """ 

3 Checks if the user is authenticated from the session 

4 Returns True if the user is authenticated 

5 """ 

6 return "account-auth" in session 

7 

8 

9def empty_session(session): 

10 """ 

11 Empty the session, used to logout. 

12 """ 

13 session.pop("account", None) 

14 session.pop("account-auth", None) 

15 session.pop("account-macaroon", None)