Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias ImportFrom alias alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Lambda arguments args defaults SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Str Assign NameStore Call NameLoad Str Str FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Assign NameStore BoolOpOr NameLoad NameLoad Assign NameStore BoolOpOr NameLoad Dict Return Call NameLoad NameLoad Num NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str If NameLoad body If Call NameLoad NameLoad body Assign NameStore Call NameLoad orelse TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Return Call NameLoad BoolOpOr NameLoad AttributeLoad NameLoad attr Str Expr Call NameLoad Num decorator_list FunctionDef arguments args defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call AttributeLoad NameLoad attr keyword NameLoad body If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If BoolOpAnd NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Call NameLoad AttributeLoad NameLoad attr Return NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore BoolOpOr AttributeLoad NameLoad attr Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Call NameLoad AttributeLoad NameLoad attr Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body If Call NameLoad body Return Call NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Assign NameStore IfExp Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str BinOpMod Str NameLoad Return Call NameLoad keyword NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list If Call NameLoad NameLoad body Return Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body If Call NameLoad body Return Call NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults vararg body Expr Str Assign NameStore Dict Str Str Str Lambda arguments args defaults Call NameLoad Lambda arguments args defaults Call NameLoad Lambda arguments args defaults AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Assign NameStore Dict Assign NameStore ListComp TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad For TupleStore NameStore NameStore NameLoad body If BoolOpAnd NameLoad Call NameLoad body Return Call NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str BinOpMod Str NameLoad If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad keyword NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults vararg body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Assign NameStore ListComp Call NameLoad Call NameLoad NameLoad comprehension NameStore NameLoad For NameStore NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad Return Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults vararg body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call NameLoad ListComp Call NameLoad NameLoad comprehension NameStore NameLoad If Call AttributeLoad NameLoad attr body Return Call NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body If AttributeLoad NameLoad attr body Return Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
    flask_security.decorators
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Flask-Security decorators module

    :copyright: (c) 2012 by Matt Wright.
    :license: MIT, see LICENSE for more details.
 collections namedtuple functools wraps flask abort current_app Response request url_for redirect _request_ctx_stack flask_login current_user login_required flask_principal RoleNeed Permission Identity identity_changed werkzeug.local LocalProxy werkzeug.routing BuildError N/A utils N/A _security N/A LocalProxy N/A N/A N/A N/A N/A N/A current_app extensions N/A security N/A _default_unauthorized_html 
    <h1>Unauthorized</h1>
    <p>The server could not verify that you are authorized to access the URL
    requested. You either supplied the wrong credentials (e.g. a bad password),
    or your browser doesn't understand how to supply the credentials required.</p>
     N/A BasicAuth N/A namedtuple BasicAuth username, password _get_unauthorized_response N/A N/A text headers N/A None None N/A N/A text N/A text _default_unauthorized_html N/A headers N/A headers N/A N/A N/A Response text 401 headers N/A _get_unauthorized_view N/A N/A N/A N/A N/A view N/A N/A utils get_url N/A N/A utils config_value UNAUTHORIZED_VIEW N/A view N/A N/A N/A callable view N/A N/A view N/A view N/A N/A N/A N/A view N/A url_for view N/A N/A N/A BuildError N/A N/A view None N/A N/A N/A utils do_flash N/A N/A utils get_message UNAUTHORIZED N/A N/A redirect N/A view N/A request referrer / N/A N/A abort 403 N/A _check_token N/A N/A N/A N/A N/A header_key N/A _security token_authentication_header N/A args_key N/A _security token_authentication_key N/A header_token N/A N/A N/A request headers get header_key None N/A token N/A N/A N/A request args get args_key header_token N/A N/A N/A request get_json silent True N/A N/A N/A N/A isinstance N/A request json list N/A N/A token N/A N/A N/A request json get args_key token N/A user N/A N/A N/A _security login_manager token_callback token N/A N/A user N/A user is_authenticated N/A N/A app N/A N/A current_app _get_current_object N/A N/A N/A _request_ctx_stack top user user N/A N/A N/A identity_changed send app identity N/A Identity N/A user id N/A True N/A False N/A _check_http_auth N/A N/A N/A N/A N/A auth N/A N/A request authorization N/A BasicAuth username None password None N/A user N/A N/A N/A _security datastore find_user email N/A auth username N/A N/A user N/A N/A utils verify_and_update_password N/A auth password user N/A N/A N/A N/A N/A _security datastore commit N/A app N/A N/A current_app _get_current_object N/A N/A N/A _request_ctx_stack top user user N/A N/A N/A identity_changed send app identity N/A Identity N/A user id N/A True N/A False N/A http_auth_required N/A N/A realm N/A N/A N/A Decorator that protects endpoints using Basic HTTP authentication.
    The username should be set to the user's email address.

    :param realm: optional realm name decorator N/A N/A fn N/A N/A wrapper N/A N/A N/A args kwargs N/A N/A N/A _check_http_auth N/A N/A N/A fn args kwargs N/A N/A _security _unauthorized_callback N/A N/A N/A N/A _security _unauthorized_callback N/A N/A r N/A N/A callable realm N/A _security default_http_auth_realm realm N/A h N/A WWW-Authenticate N/A Basic realm="%s" r N/A N/A _get_unauthorized_response headers h N/A N/A wraps fn N/A wrapper N/A N/A N/A callable realm N/A N/A N/A decorator realm N/A decorator N/A auth_token_required N/A N/A fn N/A N/A N/A Decorator that protects endpoints using token authentication. The token
    should be added to the request by the client by using a query string
    variable with a name equal to the configuration value of
    `SECURITY_TOKEN_AUTHENTICATION_KEY` or in a request header named that of
    the configuration value of `SECURITY_TOKEN_AUTHENTICATION_HEADER`
     decorated N/A N/A N/A args kwargs N/A N/A N/A _check_token N/A N/A N/A fn args kwargs N/A N/A _security _unauthorized_callback N/A N/A N/A N/A _security _unauthorized_callback N/A N/A N/A _get_unauthorized_response N/A N/A wraps fn N/A decorated N/A auth_required N/A N/A N/A auth_methods N/A N/A 
    Decorator that protects enpoints through multiple mechanisms
    Example::

        @app.route('/dashboard')
        @auth_required('token', 'session')
        def dashboard():
            return 'Dashboard'

    :param auth_methods: Specified mechanisms.
     N/A login_mechanisms N/A token basic session N/A N/A N/A N/A N/A _check_token N/A N/A N/A N/A N/A _check_http_auth N/A N/A N/A N/A N/A current_user is_authenticated wrapper N/A N/A fn N/A N/A decorated_view N/A N/A N/A args kwargs N/A N/A h N/A N/A mechanisms N/A N/A method N/A N/A login_mechanisms get method N/A method auth_methods N/A N/A method mechanism mechanisms N/A N/A N/A mechanism N/A mechanism N/A N/A N/A fn args kwargs N/A N/A N/A method basic N/A N/A r N/A _security default_http_auth_realm N/A N/A h N/A WWW-Authenticate N/A Basic realm="%s" r N/A N/A _security _unauthorized_callback N/A N/A N/A N/A _security _unauthorized_callback N/A N/A N/A _get_unauthorized_response headers h N/A N/A wraps fn N/A decorated_view N/A N/A wrapper N/A roles_required N/A N/A N/A roles N/A N/A Decorator which specifies that a user must have all the specified roles.
    Example::

        @app.route('/dashboard')
        @roles_required('admin', 'editor')
        def dashboard():
            return 'Dashboard'

    The current user must have both the `admin` role and `editor` role in order
    to view the page.

    :param args: The required roles.
     wrapper N/A N/A fn N/A N/A decorated_view N/A N/A N/A args kwargs N/A N/A perms N/A N/A Permission N/A RoleNeed role N/A role roles N/A perm perms N/A N/A N/A N/A N/A perm can N/A N/A N/A _security _unauthorized_callback N/A N/A N/A N/A _security _unauthorized_callback N/A N/A N/A _get_unauthorized_view N/A N/A fn args kwargs N/A N/A wraps fn N/A decorated_view N/A N/A wrapper N/A roles_accepted N/A N/A N/A roles N/A N/A Decorator which specifies that a user must have at least one of the
    specified roles. Example::

        @app.route('/create_post')
        @roles_accepted('editor', 'author')
        def create_post():
            return 'Create Post'

    The current user must have either the `editor` role or `author` role in
    order to view the page.

    :param args: The possible roles.
     wrapper N/A N/A fn N/A N/A decorated_view N/A N/A N/A args kwargs N/A N/A perm N/A Permission N/A N/A RoleNeed role N/A role roles N/A N/A N/A perm can N/A N/A N/A fn args kwargs N/A N/A _security _unauthorized_callback N/A N/A N/A N/A _security _unauthorized_callback N/A N/A N/A _get_unauthorized_view N/A N/A wraps fn N/A decorated_view N/A N/A wrapper N/A anonymous_user_required N/A N/A f N/A N/A wrapper N/A N/A N/A args kwargs N/A N/A N/A current_user is_authenticated N/A N/A N/A redirect N/A N/A utils get_url N/A _security post_login_view N/A N/A f args kwargs N/A N/A wraps f N/A wrapper N/A