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
Session
cookie and as a salt by CSRF token generation. - session_max_age – Maximum allowed age of
Session
cookie nonce in seconds. - secure_cookie (bool) – If
True
theSession
cookie will be saved witSecure
attribute. - 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
True
exceptions encountered during the login procedure will be caught and reported in theLoginResult.error
attribute. Default isTrue
. - debug (bool) – If
True
traceback 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
logger
is set. Default islogging.INFO
. - prefix (str) – Prefix used as the
Session
cookie name. - logger – A
logging.logger
instance.
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.