djangosnippets.org: Latest snippets tagged with 'openid'http://djangosnippets.org/tags/openid/2012-12-04T09:27:39.814163-06:00Use django-social-auth & Google Accounts for admin login
2012-12-04T09:27:39.814163-06:00pmdarrowhttp://djangosnippets.org/snippets/2856/<ol>
<li>Create an app and place this in <code>admin.py</code>. </li>
<li>Add <code>url(r'^login/$', 'social_auth.views.auth', {'backend': 'google'}, name='login')</code> to your <code>urls.py</code>.</li>
<li>Add the app to your <code>INSTALLED_APPS</code> after <code>django.contrib.admin</code>. </li>
<li>Set <code>USE_SOCIAL_AUTH_AS_ADMIN_LOGIN = True</code> in your <code>settings.py</code>.</li>
<li>...</li>
<li>Profit.</li>
</ol>
Freely redistributableGoogle Account authentication
2010-09-01T09:46:48.433263-05:00Hangyahttp://djangosnippets.org/snippets/2183/<p>Use django_openid_auth from https://launchpad.net/django-openid-auth to authenticate your users with their Google Account.</p>
<p>This snippet will allow your users having a Google Account address as username to log in using it.</p>
Freely redistributableOpenID Form Field
2008-01-25T05:41:45.762291-06:00jpwattshttp://djangosnippets.org/snippets/565/<p><strong>This is a newforms field for OpenID 1 & 2.</strong></p>
<p>It normalizes and validates OpenID identifiers according to the <a href="http://openid.net/specs/openid-authentication-2_0.html#normalization">spec</a>:</p>
<ul>
<li><code>xri://=joelwatts</code> to <code>=joelwatts</code></li>
<li><code>joelwatts.com</code> to <code>http://joelwatts.com/</code></li>
<li><code>www.joelwatts.com</code> to <code>http://joelwatts.com/</code></li>
</ul>
<p>An identifier that is well-formed, but not an OpenID (e.g. <code>example.com</code>), will cause a validation error.</p>
<p>Requires <a href="http://openidenabled.com/python-openid/">Python OpenID …</a></p>
Freely redistributablePartial OpenID provider implementation from idproxy.net
2007-07-12T12:12:09.860284-05:00simonhttp://djangosnippets.org/snippets/310/<p>Lots of people have asked me when the <a href="http://code.google.com/p/django-openid/">django-openid</a> package will provide tools for running an OpenID provider (in addition to an OpenID consumer). The answer is "when it's done", but since it's such a common request I've decided to post some example code to help people who want to …</p>
Freely redistributable