Authentication¶
- datareservoirio.Authenticator¶
- class datareservoirio.authenticate.UserAuthenticator(auth_force=False, session_key=None)¶
Authorized session where credentials are given in the DataReservoir.io web application. When a valid code is presented, the session is authenticated and persisted. A previous session will be reused as long as it is not expired. When required, a new authentication code is prompted for.
Extends
BaseAuthSession
.- Parameters
auth_force (bool, optional) – Force re-authenticating the session (default is False)
session_key (str, optional) – Unique identifier for an auth session. Can be used so that multiple instances can have independent auth/refresh cycles with the identity authority. Prevents local cache from being accidently overwritten.
- class datareservoirio.authenticate.ClientAuthenticator(client_id, client_secret)¶
Authorized session where credentials are given as client_id and client_secret. When valid credentials are presented, the session is authenticated and persisted.
Extends
BaseAuthSession
.- Parameters
- refresh_token(*args, **kwargs)¶
Refresh (expired) access token