adam.auth module¶
auth.py
-
class
adam.auth.Auth(rest)¶ Bases:
objectModule for generating, validating, and using authentication tokens
-
__init__(rest)¶ Expects a RestProxy that it will use to communicate with the server for authentication.
-
authenticate()¶ Checks whether the user’s access token is valid. If so, updates this object to hold information about the token’s logged in user. If not, clears information from this object.
- Returns
Whether this object now reflects a valid user session.
-
get_logged_in()¶ Accessor for logged in.
- Returns
Stored logged in value. If accessed before call to authenticate, will be False.
-
get_user()¶ Accessor for user email.
- Returns
Stored user email. If accessed before call to authenticate, will be empty.
-