Commits

benoitc  committed e47954f

fix discovery

  • Participants
  • Parent commits c39b6c6

Comments (0)

Files changed (4)

File django_authopenid/middleware.py

         if path == "/" and request.META.has_key('HTTP_ACCEPT') and \
                 best_match(['text/html', 'application/xrds+xml'], 
                     request.META['HTTP_ACCEPT']) == 'application/xrds+xml':
-            return HttpResponseRedirect(reverse('yadis_xrdf'))
+            return HttpResponseRedirect(reverse('oid_xrdf'))
         return response

File django_authopenid/templates/authopenid/yadis.xrdf

    xmlns:openid='http://openid.net/xmlns/1.0'
    xmlns='xri://$xrd*($v*2.0)'>
  <XRD>
-   <Service>
+   <Service priority="1">
      <Type>http://specs.openid.net/auth/2.0/return_to</Type>
      {% for uri in return_to %}
         <URI>{{ uri }}</URI>

File django_authopenid/urls.py

         name='registration_complete'),
         
     # yadis uri
-    url(r'^yadis.xrdf$', oid_views.xrdf, name='oid_views.yadis_xrdf'),
+    url(r'^yadis.xrdf$', oid_views.xrdf, name='oid_xrdf'),
 )

File example/templates/base.html

         <title>django-authopenid Example App</title>
 
         <meta http-equiv="content-type" content="text/html; charset=utf-8">
+        <meta http-equiv="X-XRDS-Location" content="{% url oid_xrdf %}"/>  
         <link rel="stylesheet" href="{{ MEDIA_URL }}/css/base.css" />
         <link rel="stylesheet" href="{{ MEDIA_URL }}/css/openid.css" />
         {% block head %}