Extras¶
Flask Extras¶
Utilities you can use when using this library with the Flask framework.
Thanks to Mark Steve Samson.
-
class
authomatic.extras.flask.FlaskAuthomatic(config, secret, session_max_age=600, secure_cookie=False, session=None, session_save_method=None, report_errors=True, debug=False, logging_level=20, prefix='authomatic', logger=None)[source]¶ Flask Plugin for authomatic support.
Encapsulates all the functionality of this package.
Parameters: - config (dict) – Config
- secret (str) – A secret string that will be used as the key for signing
Sessioncookie and as a salt by CSRF token generation. - session_max_age – Maximum allowed age of
Sessioncookie nonce in seconds. - secure_cookie (bool) – If
TruetheSessioncookie will be saved witSecureattribute. - session – Custom dictionary-like session implementation.
- session_save_method (callable) – A method of the supplied session or any mechanism that saves the session data and cookie.
- report_errors (bool) – If
Trueexceptions encountered during the login procedure will be caught and reported in theLoginResult.errorattribute. Default isTrue. - debug (bool) – If
Truetraceback of exceptions will be written to response. Default isFalse. - logging_level (int) – The logging level threshold for the default logger as specified in
the standard Python
logging library.
This setting is ignored when
loggeris set. Default islogging.INFO. - prefix (str) – Prefix used as the
Sessioncookie name. - logger – A
logging.loggerinstance.
Interfaces¶
If you want to implement framework specific extras, use these abstract classes as bases:
Google Appengine 1st generation¶
The module authomatic.extras.gae is outdated and supports only first generation Google Appengine.
It can be used for backward compatibility.
For internals please look at the source code.
Auto documentation is not supported.