Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias alias alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias alias alias Assign NameStore Call NameLoad Lambda arguments args defaults Call NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Str attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Return If Call NameLoad Call NameLoad NameLoad NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd BoolOpOr UnaryOpNot AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr BoolOpOr UnaryOpNot AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call NameLoad TupleLoad Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str body Expr Str If Call AttributeLoad NameLoad attr TupleLoad Str Str Str body Assign NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad keyword NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp IfExp Call NameLoad NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str comprehension NameStore NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad attr If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If BoolOpAnd UnaryOpNot NameLoad UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Call NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body If CompareIn AttributeLoad NameLoad attr NameLoad body Return Call NameLoad NameLoad NameLoad orelse If AttributeLoad AttributeLoad NameLoad attr attr body Return Call NameLoad NameLoad NameLoad orelse If UnaryOpNot AttributeLoad NameLoad attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body If CompareIn AttributeLoad NameLoad attr NameLoad body Return Call NameLoad NameLoad NameLoad orelse If AttributeLoad AttributeLoad NameLoad attr attr body Return Call NameLoad NameLoad NameLoad orelse If UnaryOpNot AttributeLoad NameLoad attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr orelse If UnaryOpNot Call NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr If BoolOpOr CompareIsNot NameLoad NameLoad CompareNotEq NameLoad Num body Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareIsNot AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareNotIn NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad orelse Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args defaults body If BoolOpAnd Call NameLoad UnaryOpNot Call NameLoad AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Str NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Index Num attr Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Str keyword Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Return Call NameLoad keyword Call NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list
N/A N/A 
    flask.ext.login.utils
    ---------------------
    General utilities.
 N/A hmac hashlib sha512 functools wraps werkzeug.local LocalProxy werkzeug.security safe_str_cmp werkzeug.urls url_decode url_encode flask _request_ctx_stack current_app request session url_for has_request_context _compat text_type urlparse urlunparse config COOKIE_NAME EXEMPT_METHODS signals user_logged_in user_logged_out user_login_confirmed N/A current_user N/A LocalProxy N/A N/A N/A N/A N/A _get_user encode_cookie N/A N/A payload N/A N/A N/A 
    This will encode a ``unicode`` value into a cookie, and sign that cookie
    with the app's secret key.

    :param payload: The value to encode, as `unicode`.
    :type payload: unicode
     N/A N/A N/A {0}|{1} format payload N/A _cookie_digest payload N/A decode_cookie N/A N/A cookie N/A N/A N/A 
    This decodes a cookie given by `encode_cookie`. If verification of the
    cookie fails, ``None`` will be implicitly returned.

    :param cookie: An encoded cookie.
    :type cookie: str
     N/A N/A N/A N/A payload digest N/A N/A cookie rsplit | 1 N/A N/A hasattr digest decode N/A N/A digest N/A N/A digest decode ascii N/A N/A N/A ValueError N/A N/A N/A N/A safe_str_cmp N/A _cookie_digest payload digest N/A N/A payload N/A make_next_param N/A N/A login_url current_url N/A N/A N/A 
    Reduces the scheme and host from a given URL so it can be passed to
    the given `login` URL more efficiently.

    :param login_url: The login URL being redirected to.
    :type login_url: str
    :param current_url: The URL to reduce.
    :type current_url: str
     N/A l N/A urlparse login_url N/A c N/A urlparse current_url N/A N/A N/A N/A N/A l scheme N/A N/A l scheme N/A c scheme N/A N/A N/A l netloc N/A N/A l netloc N/A c netloc N/A N/A N/A urlunparse N/A N/A c path N/A c params N/A c query N/A current_url N/A login_url N/A N/A login_view next_url next_field N/A None next N/A N/A 
    Creates a URL for redirecting to a login page. If only `login_view` is
    provided, this will just return the URL for it. If `next_url` is provided,
    however, this will append a ``next=URL`` parameter to the query string
    so that the login view can redirect back to that URL.

    :param login_view: The name of the login view. (Alternately, the actual
                       URL to the login view.)
    :type login_view: str
    :param next_url: The URL to give the login view for redirection.
    :type next_url: str
    :param next_field: What field to store the next URL in. (It defaults to
                       ``next``.)
    :type next_field: str
     N/A N/A N/A login_view startswith N/A https:// http:// / N/A N/A base login_view N/A N/A base N/A url_for login_view N/A N/A next_url None N/A N/A base N/A parts N/A list N/A urlparse base N/A md N/A url_decode N/A parts N/A 4 N/A N/A md N/A next_field N/A make_next_param base next_url N/A N/A parts N/A 4 N/A url_encode md sort True N/A N/A urlunparse parts N/A make_secure_token N/A N/A N/A args options N/A N/A 
    This will create a secure token that you can use as an authentication
    token for your users. It uses heavy-duty HMAC encryption to prevent people
    from guessing the information. (To make it even more effective, if you
    will never need to regenerate the token, you can  pass some random data
    as one of the arguments.)

    :param \*args: The data to include in the token.
    :type args: args
    :param \*\*options: To manually specify a secret key, pass ``key=THE_KEY``.
        Otherwise, the ``current_app`` secret key will be used.
    :type \*\*options: kwargs
     N/A key N/A N/A options get key N/A key N/A _secret_key key N/A l N/A N/A N/A isinstance s bytes s N/A N/A s encode utf-8 N/A s args N/A payload N/A N/A join l N/A token_value N/A N/A N/A N/A hmac new key payload sha512 hexdigest N/A N/A hasattr token_value decode N/A N/A token_value N/A N/A token_value decode utf-8 N/A token_value N/A login_fresh N/A N/A N/A N/A N/A 
    This returns ``True`` if the current login is fresh.
     N/A N/A N/A session get _fresh False N/A login_user N/A N/A user remember force fresh N/A False False True N/A N/A 
    Logs a user in. You should pass the actual user object to this. If the
    user's `is_active` property is ``False``, they will not be logged in
    unless `force` is ``True``.

    This will return ``True`` if the log in attempt succeeds, and ``False`` if
    it fails (i.e. because the user is inactive).

    :param user: The user object to log in.
    :type user: object
    :param remember: Whether to remember the user after their session expires.
        Defaults to ``False``.
    :type remember: bool
    :param force: If the user is inactive, setting this to ``True`` will log
        them in regardless. Defaults to ``False``.
    :type force: bool
    :param fresh: setting this to ``False`` will log in the user with a session
    marked as not "fresh". Defaults to ``True``.
    :type fresh: bool
     N/A N/A N/A force N/A N/A user is_active N/A N/A False N/A user_id N/A N/A getattr user N/A N/A current_app login_manager id_attribute N/A N/A session N/A user_id user_id N/A N/A session N/A _fresh fresh N/A N/A session N/A _id N/A _create_identifier N/A remember N/A N/A N/A session N/A remember set N/A N/A N/A _request_ctx_stack top user user N/A N/A N/A user_logged_in send N/A N/A current_app _get_current_object user N/A _get_user N/A True N/A logout_user N/A N/A N/A N/A N/A 
    Logs a user out. (You do not need to pass the actual user.) This will
    also clean up the remember me cookie if it exists.
     N/A user N/A _get_user N/A N/A user_id session N/A N/A N/A N/A session pop user_id N/A N/A _fresh session N/A N/A N/A N/A session pop _fresh N/A cookie_name N/A N/A N/A current_app config get REMEMBER_COOKIE_NAME COOKIE_NAME N/A N/A cookie_name N/A request cookies N/A N/A N/A session N/A remember clear N/A N/A N/A user_logged_out send N/A N/A current_app _get_current_object user user N/A N/A N/A N/A current_app login_manager reload_user N/A True N/A confirm_login N/A N/A N/A N/A N/A 
    This sets the current session as fresh. Sessions become stale when they
    are reloaded from a cookie.
     N/A N/A session N/A _fresh True N/A N/A session N/A _id N/A _create_identifier N/A N/A N/A user_login_confirmed send N/A N/A current_app _get_current_object N/A login_required N/A N/A func N/A N/A N/A 
    If you decorate a view with this, it will ensure that the current user is
    logged in and authenticated before calling the actual view. (If they are
    not, it calls the :attr:`LoginManager.unauthorized` callback.) For
    example::

        @app.route('/post')
        @login_required
        def post():
            pass

    If there are only certain times you need to require that your user is
    logged in, you can do so with::

        if not current_user.is_authenticated:
            return current_app.login_manager.unauthorized()

    ...which is essentially the code that this function adds to your views.

    It can be convenient to globally turn off authentication when unit testing.
    To enable this, if the application configuration variable `LOGIN_DISABLED`
    is set to `True`, this decorator will be ignored.

    .. Note ::

        Per `W3 guidelines for CORS preflight requests
        <http://www.w3.org/TR/cors/#cross-origin-request-with-preflight-0>`_,
        HTTP ``OPTIONS`` requests are exempt from login checks.

    :param func: The view function to decorate.
    :type func: function
     decorated_view N/A N/A N/A args kwargs N/A N/A N/A N/A request method EXEMPT_METHODS N/A N/A N/A func args kwargs N/A N/A N/A N/A current_app login_manager _login_disabled N/A N/A N/A func args kwargs N/A N/A N/A N/A current_user is_authenticated N/A N/A N/A N/A N/A current_app login_manager unauthorized N/A N/A func args kwargs N/A N/A wraps func N/A decorated_view N/A fresh_login_required N/A N/A func N/A N/A N/A 
    If you decorate a view with this, it will ensure that the current user's
    login is fresh - i.e. their session was not restored from a 'remember me'
    cookie. Sensitive operations, like changing a password or e-mail, should
    be protected with this, to impede the efforts of cookie thieves.

    If the user is not authenticated, :meth:`LoginManager.unauthorized` is
    called as normal. If they are authenticated, but their session is not
    fresh, it will call :meth:`LoginManager.needs_refresh` instead. (In that
    case, you will need to provide a :attr:`LoginManager.refresh_view`.)

    Behaves identically to the :func:`login_required` decorator with respect
    to configutation variables.

    .. Note ::

        Per `W3 guidelines for CORS preflight requests
        <http://www.w3.org/TR/cors/#cross-origin-request-with-preflight-0>`_,
        HTTP ``OPTIONS`` requests are exempt from login checks.

    :param func: The view function to decorate.
    :type func: function
     decorated_view N/A N/A N/A args kwargs N/A N/A N/A N/A request method EXEMPT_METHODS N/A N/A N/A func args kwargs N/A N/A N/A N/A current_app login_manager _login_disabled N/A N/A N/A func args kwargs N/A N/A N/A N/A current_user is_authenticated N/A N/A N/A N/A N/A current_app login_manager unauthorized N/A N/A N/A N/A login_fresh N/A N/A N/A N/A N/A current_app login_manager needs_refresh N/A N/A func args kwargs N/A N/A wraps func N/A decorated_view N/A set_login_view N/A N/A login_view blueprint N/A None N/A N/A 
    Sets the login view for the app or blueprint. If a blueprint is passed,
    the login view is set for this blueprint on ``blueprint_login_views``.

    :param login_view: The user object to log in.
    :type login_view: str
    :param blueprint: The blueprint which this login view should be set on.
        Defaults to ``None``.
    :type blueprint: object
     N/A num_login_views N/A len N/A N/A current_app login_manager blueprint_login_views N/A N/A N/A blueprint None N/A num_login_views 0 N/A N/A N/A N/A N/A current_app login_manager blueprint_login_views N/A N/A blueprint name login_view N/A N/A N/A N/A N/A current_app login_manager login_view None N/A None N/A N/A current_app login_manager blueprint_login_views N/A N/A N/A N/A N/A current_app login_manager blueprint_login_views N/A None N/A N/A current_app login_manager login_view N/A N/A N/A current_app login_manager login_view None N/A N/A N/A N/A current_app login_manager login_view login_view N/A _get_user N/A N/A N/A N/A N/A N/A N/A has_request_context N/A N/A hasattr N/A _request_ctx_stack top user N/A N/A N/A N/A N/A current_app login_manager _load_user N/A N/A getattr N/A _request_ctx_stack top user None N/A _cookie_digest N/A N/A payload key N/A None N/A N/A key N/A _secret_key key N/A N/A N/A N/A N/A hmac new key N/A N/A payload encode utf-8 sha512 hexdigest N/A _get_remote_addr N/A N/A N/A N/A N/A address N/A N/A N/A request headers get X-Forwarded-For N/A request remote_addr N/A N/A address None N/A N/A address N/A N/A N/A N/A N/A N/A N/A address encode utf-8 split , N/A 0 strip N/A address N/A _create_identifier N/A N/A N/A N/A N/A user_agent N/A N/A N/A request headers get User-Agent N/A N/A user_agent None N/A N/A user_agent N/A N/A user_agent encode utf-8 N/A base N/A N/A {0}|{1} format N/A _get_remote_addr user_agent N/A N/A str bytes N/A N/A base N/A text_type base utf-8 errors replace N/A h N/A sha512 N/A N/A N/A h update N/A N/A base encode utf8 N/A N/A N/A h hexdigest N/A _user_context_processor N/A N/A N/A N/A N/A N/A dict current_user N/A _get_user N/A _secret_key N/A N/A key N/A None N/A N/A N/A key None N/A N/A key N/A N/A current_app config N/A SECRET_KEY N/A N/A isinstance key text_type N/A N/A key N/A N/A key encode latin1 N/A key N/A