authopenid_middleware iconauthopenid_middleware 0.2.2

OpenID authentication middleware for WSGI applications
authopenid_middleware tries to implement OpenID Authentication middleware.

There are two scenarios how this middleware can be used. They are actually very similar to AuthFormMiddleware. First is when user is forced to login (involuntary):

1. User tries to access some place in your web site that requires authorization and HTTP Exception with code 401 (not authenticated) is thrown.
2. Middleware remembers what user tried to access (to session as referer) and redirects you to loginurl (default "/login") where login form is displayed to user. Form must contain one field with name "openid".
3. User enters openid and clicks submit. Form data is send to verifyurl (default "/verify").
4. There happens OpenID magic and processurl is triggered. There postprocess is called if it is defined. postprocess is given three arguments: environ, OpenID login URL (or canonical URL) and openid data (currently only SREG). postprocess can return new username as well (e.g. real username from database).
5. User is redirected to referer.

last updated on:
October 29th, 2009, 14:04 GMT
developed by:
Dalius Dobravolskas
license type:
MIT/X Consortium License 
ROOT \ Internet \ HTTP (WWW)


In a hurry? Add it to your Download Basket!

user rating



Add your review!