File: //home/arjun/projects/buyercall/buyercall/lib/__pycache__/supervisor_manager.cpython-310.pyc
o
�weZ| � @ s< d Z dZd�e�ZdZdZdZdgZddlm Z m
Z
mZmZm
Z
mZmZmZmZ dd lmZ dd
lmZ ddlmZmZ ddlmZmZ dd
lmZ ddlmZmZ ddl Z ddl!Z!ddl"Z"ddl#m$Z$m%Z% e� Z&edd� �Z'dZ(edd�Z)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1G dd� de2�Z3G dd� de2�Z4G dd � d e2�Z5d!d"� Z6d#d$� Z7d%d&� Z8d'd(� Z9dPd*d+�Z:d,d-� Z;d.d/� Z<dQd0d1�Z=d2d3� Z>d4d5� Z?d6d7� Z@d8d9� ZAd:d;� ZBdRd<d=�ZCd>d?� ZDd@dA� ZEdBdC� ZFdRdDdE�ZGe&�HdF�ZIe&�HdG�ZJe&�HdH�ZKe&�HdI�ZLe&�HdJ�ZMe&�HdK�ZNe&�HdL�ZOe&�HdM�ZPe&�HdN�ZQe&�HdO�ZRdS )Sa
flask.ext.login
---------------
This module provides user session management for Flask. It lets you log
your users in and out in a database-independent manner.
:copyright: (c) 2011 by Matthew Frazier.
:license: MIT/X11, see LICENSE for more details.
)�0�2�11�.zMatthew FrazierzMIT/X11z(c) 2011 by Matthew Frazier�LoginManager� ) �_request_ctx_stack�abort�current_app�flash�redirect�request�session�url_for�has_request_context)� Namespace)�
LocalProxy)�
url_decode�
url_encode)�datetime� timedelta��wraps)�sha1�md5N)�urlparse�
urlunparsec C s t � S �N)� _get_user� r r �B/home/arjun/projects/buyercall/buyercall/lib/supervisor_manager.py�<lambda>+ s r �supervisor_tokenim )�daysFz"Please log in to access this page.�dangerz*Please reauthenticate to access this page.�get_id�
Authorizationc @ s� e Zd ZdZd,dd�Zd-dd�Zd-dd �Zd
d� Zdd
� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zd.dd�Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� ZdS )/r a
This object is used to hold the settings used for logging in. Instances of
:class:`LoginManager` are *not* bound to specific apps, so you can create
one in the main body of your code and then bind it to your
app in a factory function.
NTc C s| t | _d | _t| _t| _d | _t| _ t
| _d| _d | _
d | _d | _d | _d | _t| _d | _d | _|d ur<| �||� d S d S )N�basic)�AnonymousUserMixin�anonymous_user�
login_view�
LOGIN_MESSAGE�
login_message�LOGIN_MESSAGE_CATEGORY�login_message_category�refresh_view�REFRESH_MESSAGE�needs_refresh_message�REFRESH_MESSAGE_CATEGORY�needs_refresh_message_category�session_protection�localize_callback�token_callback�
user_callback�unauthorized_callback�needs_refresh_callback�ID_ATTRIBUTE�id_attribute�header_callback�request_callback�init_app��self�app�add_context_processorr r r �__init__U s&