File: //opt/alt/python37/lib/python3.7/site-packages/paste/__pycache__/session.cpython-37.pyc
B
a�NG, � @ s& d Z ddlmZ ddlZddlZddlZddlZddlZddlZyddl Z W n e
k
rh ddlZ Y nX yddlm
Z
W n e
k
r� ddl
m
Z
Y nX ddlmZ ddlmZ G dd� de�ZG d d
� d
e�Zdadaejdd
�aG dd� de�ZG dd� de�Ze� Zeeeeefdd�ZdS )a�
Creates a session object in your WSGI environment.
Use like:
..code-block:: Python
environ['paste.session.factory']()
This will return a dictionary. The contents of this dictionary will
be saved to disk when the request is completed. The session will be
created when you first fetch the session dictionary, and a cookie will
be sent in that case. There's current no way to use sessions without
cookies, and there's no way to delete a session except to clear its
data.
@@: This doesn't do any locking, and may cause problems when a single
session is accessed concurrently. Also, it loads and saves the
session for each request, with no caching. Also, sessions aren't
expired.
� )�SimpleCookieN)�md5)�wsgilib)�requestc @ s e Zd Zddd�Zdd� ZdS )�SessionMiddlewareNc K s || _ || _d S )N)�application�
factory_kw)�selfr �global_confr � r �>/opt/alt/python37/lib/python3.7/site-packages/paste/session.py�__init__/ s zSessionMiddleware.__init__c sb t |f| j���|d<