<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: djangoopenid</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/djangoopenid.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2007-07-18T07:50:04+00:00</updated><author><name>Simon Willison</name></author><entry><title>A Recipe for OpenID-Enabling Your Site</title><link href="https://simonwillison.net/2007/Jul/18/recipe/#atom-tag" rel="alternate"/><published>2007-07-18T07:50:04+00:00</published><updated>2007-07-18T07:50:04+00:00</updated><id>https://simonwillison.net/2007/Jul/18/recipe/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.plaxo.com/api/openid_recipe"&gt;A Recipe for OpenID-Enabling Your Site&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Detailed guide to setting your site up as an OpenID consumer from Plaxo, who just launched their OpenID implementation. It basically describes the design I’m using for the next release of django-openid.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/djangoopenid"&gt;djangoopenid&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/openid"&gt;openid&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/plaxo"&gt;plaxo&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tutorial"&gt;tutorial&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="djangoopenid"/><category term="openid"/><category term="plaxo"/><category term="tutorial"/></entry><entry><title>Turn your Django application in to an OpenID consumer</title><link href="https://simonwillison.net/2007/Apr/24/openidconsumer/#atom-tag" rel="alternate"/><published>2007-04-24T01:41:46+00:00</published><updated>2007-04-24T01:41:46+00:00</updated><id>https://simonwillison.net/2007/Apr/24/openidconsumer/#atom-tag</id><summary type="html">
    &lt;p&gt;I've just put the finishing touches on the first releasable version of &lt;a href="http://code.google.com/p/django-openid/"&gt;django_openidconsumer&lt;/a&gt;, a package that makes it easy to add &lt;a href="http://openid.net/"&gt;OpenID&lt;/a&gt; consumer support to any &lt;a href="http://www.djangoproject.com/"&gt;Django&lt;/a&gt; application.&lt;/p&gt;

&lt;p&gt;Full documentation &lt;a href="http://django-openid.googlecode.com/svn/trunk/openid.html"&gt;can be found in the repository&lt;/a&gt;. The package consists of Django models that implement the persistent part of an OpenID consumer, some simple views that hook in to the &lt;a href="http://www.openidenabled.com/openid/libraries/python"&gt;python-openid&lt;/a&gt; library from &lt;a href="http://www.openidenabled.com/"&gt;OpenID Enabled&lt;/a&gt; and a piece of middleware that makes the user's OpenID(s) directly available within a Django view.&lt;/p&gt;

&lt;p&gt;To cut a long story short, it allows you write view functions that look like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class="python"&gt;
def example_view(request):
    if request.openid:
        return HttpResponse("OpenID is %s" % escape(
            str(request.openid)
        ))
    else:
        return HttpResponse("No OpenID")
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The package also supports &lt;a href="http://openid.net/specs/openid-simple-registration-extension-1_0.html"&gt;simple registration&lt;/a&gt;, which lets you request additional details such as an e-mail address or nickname from the user's OpenID provider.&lt;/p&gt;

&lt;p&gt;I plan to keep the package under active development, with the aim of using it to demonstrate best practises in implementing OpenID (hence the support for multiple OpenIDs and simple registration out of the box). Next on the list is integration with Django's built in &lt;a href="http://www.djangoproject.com/documentation/authentication/"&gt;authentication system&lt;/a&gt;, including the ability to associate one or more OpenIDs with an existing user account.&lt;/p&gt;

&lt;p&gt;Please post any feedback as a comment on this entry, and direct bug reports to &lt;a href="http://code.google.com/p/django-openid/issues/list" title="django-openid issue tracker"&gt;Google Code&lt;/a&gt;.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/djangoopenid"&gt;djangoopenid&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/openid"&gt;openid&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="django"/><category term="djangoopenid"/><category term="openid"/><category term="python"/></entry></feed>