Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Decorator to define a function as an identity loader.

An identity loader function is called before request to find any
provided identities. The first found identity is used to load from.

For example::

    app = Flask(__name__)

    principals = Principal(app)(more...)

src/f/l/Flask-Security-1.7.1/flask_security/core.py   Flask-Security(Download)
def _get_principal(app):
    p = Principal(app, use_sessions=False)
    p.identity_loader(_identity_loader)
    return p
 

src/f/l/flask-security-HEAD/flask_security/core.py   flask-security(Download)
def _get_principal(app):
    p = Principal(app, use_sessions=False)
    p.identity_loader(_identity_loader)
    return p