Functions¶
This is the only interface that you should ever need to get a user logged in, get his/her info and credentials, deserialize the credentials and access his/her protected resources.
authomatic.setup | |
authomatic.login | |
authomatic.provider_id | A simple counter to be used in the config to generate unique IDs. |
authomatic.access | |
authomatic.async_access | |
authomatic.credentials | |
authomatic.request_elements | |
authomatic.backend |
- authomatic.provider_id()¶
A simple counter to be used in the config to generate unique IDs.
Returns: int. Use it in the Config like this:
import authomatic CONFIG = { 'facebook': { 'class_': authomatic.providers.oauth2.Facebook, 'id': authomatic.provider_id(), # returns 1 'consumer_key': '##########', 'consumer_secret': '##########', 'scope': ['user_about_me', 'email'] }, 'google': { 'class_': 'authomatic.providers.oauth2.Google', 'id': authomatic.provider_id(), # returns 2 'consumer_key': '##########', 'consumer_secret': '##########', 'scope': ['https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email'] }, 'windows_live': { 'class_': 'oauth2.WindowsLive', 'id': authomatic.provider_id(), # returns 3 'consumer_key': '##########', 'consumer_secret': '##########', 'scope': ['wl.basic', 'wl.emails', 'wl.photos'] }, }
- authomatic.setup(*args, **kwargs)¶
Warning
This function is deprecated and will be removed in version 0.1.0! Use instance of Authomatic class instead.
- authomatic.login(*args, **kwargs)¶
Warning
This function is deprecated and will be removed in version 0.1.0! Use the Authomatic.login() method instead.
- authomatic.access(*args, **kwargs)¶
Warning
This function is deprecated and will be removed in version 0.1.0! Use the Authomatic.access() method instead.
- authomatic.async_access(*args, **kwargs)¶
Warning
This function is deprecated and will be removed in version 0.1.0! Use the Authomatic.async_access() method instead.
- authomatic.credentials(*args, **kwargs)¶
Warning
This function is deprecated and will be removed in version 0.1.0! Use the Authomatic.credentials() method instead.
- authomatic.request_elements(*args, **kwargs)¶
Warning
This function is deprecated and will be removed in version 0.1.0! Use the Authomatic.request_elements() method instead.
- authomatic.backend(*args, **kwargs)¶
Warning
This function is deprecated and will be removed in version 0.1.0! Use the Authomatic.backend() method instead.