Server IP : 192.158.238.246 / Your IP : 18.216.1.197 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 : |
B a�N�? � @ s� d Z dgZddlZddlZddlZddlZddlmZ dd� Zddl m Z ddlmZ dd l mZ G d d� de�ZeZdd d�ZdS )a� OpenID Authentication (Consumer) OpenID is a distributed authentication system for single sign-on originally developed at/for LiveJournal.com. http://openid.net/ URL. You can have multiple identities in the same way you can have multiple URLs. All OpenID does is provide a way to prove that you own a URL (identity). And it does this without passing around your password, your email address, or anything you don't want it to. There's no profile exchange component at all: your profiile is your identity URL, but recipients of your identity can then learn more about you from any public, semantically interesting documents linked thereunder (FOAF, RSS, Atom, vCARD, etc.). ``Note``: paste.auth.openid requires installation of the Python-OpenID libraries:: http://www.openidenabled.com/ This module is based highly off the consumer.py that Python OpenID comes with. Using the OpenID Middleware =========================== Using the OpenID middleware is fairly easy, the most minimal example using the basic login form thats included:: # Add to your wsgi app creation from paste.auth import open_id wsgi_app = open_id.middleware(wsgi_app, '/somewhere/to/store/openid/data') You will now have the OpenID form available at /oid on your site. Logging in will verify that the login worked. A more complete login should involve having the OpenID middleware load your own login page after verifying the OpenID URL so that you can retain the login information in your webapp (session, cookies, etc.):: wsgi_app = open_id.middleware(wsgi_app, '/somewhere/to/store/openid/data', login_redirect='/your/login/code') Your login code should then be configured to retrieve 'paste.auth.open_id' for the users OpenID URL. If this key does not exist, the user has not logged in. Once the login is retrieved, it should be saved in your webapp, and the user should be redirected to wherever they would normally go after a successful login. �AuthOpenIDHandler� N)�httpexceptionsc C s t �| d�}d|f S )N� z"%s")�cgi�escape)�s�qs� r �C/opt/alt/python37/lib/python3.7/site-packages/paste/auth/open_id.py� quoteattrA s r )� filestore)�consumer)� appendArgsc @ sl e Zd ZdZddd�Zdd� Zd d � Zdd� Zd d� Zdd� Z dd� Z dd� Zddd�Zdd� Z dd� ZdS ) r zq This middleware implements OpenID Consumer behavior to authenticate a URL against an OpenID Server. �/oidNFc C s>