Projects tagged ‘openid’ and ‘python’


[18 total ]

156 Users
   

Plone is a ready-to-run content management system that is built on Python and the Zope application server. Plone is easy, flexible, and gives you a system for web content that is ideal for projects, communities, websites and intranets.
Created over 3 years ago.

6 Users
 

Python OpenID is a set of Python packages that support use of the OpenID decentralized identity system in your applications. It can be used to enable single sign-on for your Web sites or for running ... [More] an OpenID server. Example code is supplied and a variety of storage back-ends are supported. [Less]
Created over 2 years ago.

2 Users
 

Samādhi is a TurboGears-based OpenID provider.
Created about 1 year ago.

1 Users

django-authopenid has moved from Google Code to Bitbucket; please head on over to the django-authopenid Bitbucket page for current code, documentation and bugs.
Created about 1 year ago.

1 Users

Views and middleware for enabling your Django application to act as an OpenID consumer. Blog announcement is here: http://simonwillison.net/2007/Apr/24/openidconsumer/
Created about 1 year ago.

0 Users

This app provides a Django model for associating multiple identities with a django.contrib.auth.models.User.
Created 12 months ago.

0 Users

The python-openid-graph application can be used to store and return information about relationships between OpenId identity URLs.
Created about 1 year ago.

0 Users

In early stage of development.
Created 11 months ago.

0 Users

OverviewThis is a simple Django pluggable for OpenID authentication. You can just login or logout, simple as that. This pluggable asumes you don't has a user database (the purpose of OpenID) and ... [More] your application use exclusively openid accounts. Obviously you can store user url in some table. If you are looking for a more complex pluggable that has another features, like registration or association, try this: http://bitbucket.org/benoitc/django-authopenid/ Google App EngineThis pluggable don't use database, so it is compatible with plain Django or Google App Engine, since GAE fixed a bug with OpenID redirects. Change logDo not use 0.1 version! 0.1 -> 0.2: New features: decorator: @openid_login_required debug mode: if settings.DEBUG = True, it uses http://debug.devenvironment.localhost as unique user. Bug fixes PluggingMediaCopy static directory content (css and images folders) to your MEDIA_ROOT directory. settings.pyMIDDLEWARE_CLASSES = ( ... 'django.contrib.sessions.middleware.SessionMiddleware', ... ) TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.request', ... 'djangoopenid.context_processors.openid', ... ) INSTALLED_APPS = ( ... 'django.contrib.sessions', 'djangoopenid', ... ) import os ROOT_PATH = os.path.dirname(__file__) MEDIA_URL = '/static/' MEDIA_ROOT = ROOT_PATH + MEDIA_URL # Sample: LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/openid/pleaselogin/' # redirect to a default page for login (template included) LOGOUT_URL = '/' # Important: Use LOGIN_REDIRECT_URL to a specific view if you want to do some pos-login action, and in that # view you can effectively redirect to some url, example: # urls.py: url('^load_user' ...) # views.py: # user, created = SomeObjectThatStoreOpenID.objects.get_or_create(openid=request.session['openiduser']) # request.session['user'] = user # return HttpResponseRedirect(reverse('PRATICALY A LOGIN_REDIRECT URL HERE')) LOGIN_REDIRECT_URL = '/load_user' # http://docs.djangoproject.com/en/dev/topics/http/sessions/?from=olddocs#configuring-the-session-engine # Don't use django.contrib.sessions.backends.cached_db if you are using Google App Engine, # because it is incompatible. SESSION_ENGINE = 'django.contrib.sessions.backends.cache'urls.pyurlpatterns = patterns('', ... url(r'^openid/', include('djangoopenid.urls')), # url('^load_user' ...) ... # use lighthttp in production url(r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT }), )In this case, the important urls are: openid/login and openid/logout # By default djangoopenid don't store sessions (stateless), if you want to use memory to store them, # set the follow variable. # Each 1000 sessions, the memory will be clean # If you prefer, put here a huge number and use cron job OPENID_SESSIONS_TO_CLEAN = 1000 Development EnvironmentIf settings.py has DEBUG = True, djangoopenid will not authenticate and always is return sucess for the user http://debug.devenvironment.localhost If you want to test djangoopenid, set DEBUG = False TemplatesYou can use: {% include "djangoopenid/openid.html" %} in some template (even base.html template) Don't forget to add css: djangoopenid/openid_help.html extends two blocks of base.html: header and content. This template shows some information to help new users of OpenID. base.html or other template: You can use jquery and jquery tooltip plugin to show help for OpenID: $(document).ready(function() { $('.help').tooltip({ track: true, delay: 0, showURL: false, showBody: " - ", fade: 250, positionLeft: true }) }) You can use also: {{ openiduser }} {% if isAuthenticated %} ... {% else %} ... {% endif %} SessionOne variable added in session map: openiduser ViewsThis pluggable add two variables in RequestContext: isAuthenticated and openiduser To use this you need to choose RequestContext, so you pass it in render_to_response: kwargs['context_instance'] = RequestContext(request) return render_to_response(*args, **kwargs)or, use the new function: from djangoopenid.utils import render_response return render_response(request, template, map)You can use decorators: from djangoopenid.decorators import openid_login_required @openid_login_required def my_view(request): passRedirect to settings.LOGIN_URL if openiduser is not in session If you are using LOGIN_REDIRECT_URL: user, created = SomeObjectThatStoreOpenID.objects.get_or_create(openid=request.session['openiduser']) request.session['user'] = user return HttpResponseRedirect(reverse('PRATICALY A LOGIN_REDIRECT URL HERE'))ModelsIf you want to store openid information in some models, you can use some property like this: openid = models.CharField(unique=True, blank=False, max_length=255, help_text='Max Length: 255')or openid = models.URLField(unique=True, blank=False, verify_exists=False, max_length=255)If you are using Google App Engine: openid = db.StringProperty(required=True, verbose_name='OpenID', multiline=False)or openid = db.LinkProperty(required=True)You can use LOGIN_REDIRECT_URL to create some data with OpenID when a user login [Less]
Created 7 months ago.

0 Users

This plugin enables OpenID authentication for the WSGI authentication middleware repoze.who.
Created 12 months ago.