403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.216.71.122
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib/python3.7/site-packages/paste/auth/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/paste/auth/__pycache__/cas.cpython-37.pyc
B

a�N��@s�dZddlZddlmZddlmZmZGdd�de�ZGdd�de�Zd	d
�Z	e	Z
ddd
gZdekr�dZ
dd
lmZddlmZddlTeee	ee
���dS)as
CAS 1.0 Authentication

The Central Authentication System is a straight-forward single sign-on
mechanism developed by Yale University's ITS department.  It has since
enjoyed widespread success and is deployed at many major universities
and some corporations.

    https://clearinghouse.ja-sig.org/wiki/display/CAS/Home
    http://www.yale.edu/tp/auth/usingcasatyale.html

This implementation has the goal of maintaining current path arguments
passed to the system so that it can be used as middleware at any stage
of processing.  It has the secondary goal of allowing for other
authentication methods to be used concurrently.
�N)�
construct_url)�HTTPSeeOther�
HTTPForbiddenc@seZdZdZdS)�CASLoginFailurez4 The exception raised if the authority returns 'no' N)�__name__�
__module__�__qualname__�__doc__�r
r
�?/opt/alt/python37/lib/python3.7/site-packages/paste/auth/cas.pyrsrc@seZdZdZdS)�CASAuthenticatez/ The exception raised to authenticate the user N)rrrr	r
r
r
rrsrcs*��d�r��d�st���fdd�}|S)a8
    middleware to implement CAS 1.0 authentication

    There are several possible outcomes:

    0. If the REMOTE_USER environment variable is already populated;
       then this middleware is a no-op, and the request is passed along
       to the application.

    1. If a query argument 'ticket' is found, then an attempt to
       validate said ticket /w the authentication service done.  If the
       ticket is not validated; an 403 'Forbidden' exception is raised.
       Otherwise, the REMOTE_USER variable is set with the NetID that
       was validated and AUTH_TYPE is set to "cas".

    2. Otherwise, a 303 'See Other' is returned to the client directing
       them to login using the CAS service.  After logon, the service
       will send them back to this same URL, only with a 'ticket' query
       argument.

    Parameters:

        ``authority``

            This is a fully-qualified URL to a CAS 1.0 service. The URL
            should end with a '/' and have the 'login' and 'validate'
            sub-paths as described in the CAS 1.0 documentation.

    �/�httpcs|�dd�}|r�||�S|�dd��d�}|r�|d�d�r�|���dd�d}d�|�|d<t|�}t�||d	��}�d
|}t�|��	��d�}d|d
kr�|d|d<d|d<�||�St
�}	n*t|�}t�d|i�}�d|}
t|
�}	|	�||�S)NZREMOTE_USER�ZQUERY_STRING�&���zticket=�=�)�service�ticketz	validate?�
�yesrZcasZ	AUTH_TYPErzlogin?)
�get�split�
startswith�pop�joinr�urllib�	urlencode�urlopen�readrrZwsgi_application)�environZstart_response�username�qsrr�argsZrequrl�resultZexce�location)�application�	authorityr
r�cas_application>s,

z'AuthCASHandler.<locals>.cas_application)�endswithr�AssertionError)r'r(r)r
)r'r(r�AuthCASHandlersr,�__main__z(https://secure.its.yale.edu/cas/servlet/)�dump_environ)�serve)�*)r	rZ
paste.requestrZpaste.httpexceptionsrrrrr,Z
middleware�__all__rr(Z
paste.wsgilibr.Zpaste.httpserverr/ZHTTPExceptionHandlerr
r
r
r�<module>s:


Youez - 2016 - github.com/yon3zu
LinuXploit