Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/trac/web/__pycache__/ |
Upload File : |
o �k�`7H � @ s< d dl mZmZ d dlmZmZ d dlmZmZ d dl Z d dl Z d dlZd dlZ d dlZ d dlmZmZmZ d dlT d dlmZmZ d dlmZmZ d d lmZmZ d d lmZ d dlm Z d dl!m"Z" d d l#m$Z$ d dl%m&Z&m'Z' G dd� de(�Z)G dd� de*ed�Z+G dd� de+�Z,G dd� de,�Z-G dd� de,�Z.dS )� )�ABCMeta�abstractmethod)� b64decode� b64encode)�md5�sha1N)� BoolOption� IntOption�Option)�*)�IAuthenticator�IRequestHandler)�Chrome�INavigationContributor)�hex_entropy�md5crypt)�crypt)� threading)�time_now)�tag)�_�tag_c @ s� e Zd ZdZeeee� dZe dddd�Z e dddd�Zedd d d�Z eddd d�Zeddd d�Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)S )*�LoginModulea� User authentication manager. This component implements user authentication based on HTTP authentication provided by the web-server, combined with cookies for communicating the login information across the whole site. This mechanism expects that the web-server is setup so that a request to the path '/login' requires authentication (such as Basic or Digest). The login name is then stored in the database and associated with a unique key that gets passed back to the user agent using the 'trac_auth' cookie. This cookie is used to identify the user in subsequent requests to non-protected resources. F�trac� check_auth_ip�falsezQWhether the IP address of the user should be checked for authentication.�ignore_auth_casez6Whether login names should be converted to lower case.�auth_cookie_domain� z�Auth cookie domain attribute. The auth cookie can be shared among multiple subdomains by setting the value to the domain. (//since 1.2//) �auth_cookie_lifetimer aL Lifetime of the authentication cookie, in seconds. This value determines how long the browser will cache authentication information, and therefore, after how much inactivity a user will have to log in again. The value of 0 makes the cookie expire at the end of the browsing session. �auth_cookie_pathz�Path for the authentication cookie. Set this to the common base path of several Trac instances if you want them to share the cookie. c C sH d }|j r |j }nd|jv r| �||jd �}|sd S | jr"|�� }|S )N� trac_auth)�remote_user�incookie�_get_name_for_cookie�ignore_case�lower)�self�req�authname� r* �//usr/lib/python3/dist-packages/trac/web/auth.py�authenticateZ s �zLoginModule.authenticatec C s dS )N�loginr* �r'