|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /lib64/python2.7/site-packages/django/contrib/auth/ |
Upload File : |
�
r�\c @ s� d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d � Z
d e f d � � YZ d e f d
� � YZ
d S( i����( t auth( t load_backend( t RemoteUserBackend( t ImproperlyConfigured( t SimpleLazyObjectc C s+ t | d � s$ t j | � | _ n | j S( Nt _cached_user( t hasattrR t get_userR ( t request( ( s@ /tmp/pip-install-XxeQeY/django/django/contrib/auth/middleware.pyR s t AuthenticationMiddlewarec B s e Z d � Z RS( c s7 t � d � s t d � � t � f d � � � _ d S( Nt sessions� The Django authentication middleware requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.sessions.middleware.SessionMiddleware'.c s
t � � S( N( R ( ( R ( s@ /tmp/pip-install-XxeQeY/django/django/contrib/auth/middleware.pyt <lambda> s ( R t AssertionErrorR t user( t selfR ( ( R s@ /tmp/pip-install-XxeQeY/django/django/contrib/auth/middleware.pyt process_request s ( t __name__t
__module__R ( ( ( s@ /tmp/pip-install-XxeQeY/django/django/contrib/auth/middleware.pyR s t RemoteUserMiddlewarec B s/ e Z d Z d Z d � Z d � Z d � Z RS( s�
Middleware for utilizing Web-server-provided authentication.
If request.user is not authenticated, then this middleware attempts to
authenticate the username passed in the ``REMOTE_USER`` request header.
If authentication is successful, the user is automatically logged in to
persist the user in the session.
The header used is configurable and defaults to ``REMOTE_USER``. Subclass
this class and change the ``header`` attribute if you need to use a
different header.
t REMOTE_USERc C s� t | d � s t d � � n y | j | j } Wn1 t k
re | j j � ra | j | � n d SX| j j � r� | j j � | j | | � k r� d S| j | � n t
j d | � } | r� | | _ t
j | | � n d S( NR
s� The Django remote user auth middleware requires the authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.auth.middleware.AuthenticationMiddleware' before the RemoteUserMiddleware class.t remote_user(
R R t METAt headert KeyErrorR
t is_authenticatedt _remove_invalid_usert get_usernamet clean_usernameR t authenticatet login( R R t usernameR
( ( s@ /tmp/pip-install-XxeQeY/django/django/contrib/auth/middleware.pyR ( s"