An OAuth consumer is a website that allows users to log in with other websites (known as OAuth providers). Once a user has gone through the OAuth dance, the consumer website is allowed to interact with the provider website on behalf of the user.
A subclass of flask.Blueprint that sets up OAuth 1 authentication.
Most of the constructor arguments are forwarded either to the flask.Blueprint constructor or the requests_oauthlib.OAuth1Session construtor, including **kwargs (which is forwarded to OAuth1Session). The only arguments that are specific to this class are base_url, request_token_url, authorization_url, access_token_url, login_url, authorized_url, redirect_url, redirect_to, and session_class.
Parameters: |
|
---|
An OAuth1Session instance that automatically loads credentials for the OAuth provider (if the user has already gone through the OAuth dance).
A decorator used to indicate the function used to retrieve a stored token from a completed OAuth dance.
A decorator used to indicate the function used to store a token from a completed OAuth dance, so that it can be retrieved later.
A decorator used to indicate the function used to delete a previously-stored OAuth token.
A proxy property for getting, setting, and deleting the stored OAuth token.
A helper method to set up the blueprint to store and retrieve OAuth tokens using the Flask session. This will overwrite any custom token accessors you’ve set up. This method is called by the constructor as a default – in general, you shouldn’t call this method yourself.
A helper method to set up the blueprint to store and retrieve OAuth tokens using SQLAlchemy. This will overwrite any custom token accessors you’ve set up.
Parameters: |
|
---|
A subclass of flask.Blueprint that sets up OAuth 2 authentication.
Most of the constructor arguments are forwarded either to the flask.Blueprint constructor or the requests_oauthlib.OAuth2Session construtor, including **kwargs (which is forwarded to OAuth2Session). The only arguments that are specific to this class are base_url, authorization_url, token_url, login_url, authorized_url, redirect_url, redirect_to, and session_class.
Parameters: |
|
---|
An OAuth2Session instance that automatically loads credentials for the OAuth provider (if the user has already gone through the OAuth dance).
A decorator used to indicate the function used to retrieve a stored token from a completed OAuth dance.
A decorator used to indicate the function used to store a token from a completed OAuth dance, so that it can be retrieved later. This function will also be called when the token is refreshed.
A decorator used to indicate the function used to delete a previously-stored OAuth token.
A proxy property for getting, setting, and deleting the stored OAuth token.
A helper method to set up the blueprint to store and retrieve OAuth tokens using the Flask session. This will overwrite any custom token accessors you’ve set up. This method is called by the constructor as a default – in general, you shouldn’t call this method yourself.
A helper method to set up the blueprint to store and retrieve OAuth tokens using SQLAlchemy. This will overwrite any custom token accessors you’ve set up.
Parameters: |
|
---|
A SQLAlchemy declarative mixin with some suggested columns for a model to store OAuth tokens: