Skip to content

Commit f479ce5

Browse files
author
Kevin Turner
committed
[project @ openid.message, openid.consumer.discover: update 2.0 URIs for spec rev 295]
Also correct a number of places in the code that confused OPENID_2_0_TYPE and OPENID2_NS. These used to be the same string, but they are no longer.
1 parent 3a613e9 commit f479ce5

13 files changed

Lines changed: 22 additions & 20 deletions

‎openid/consumer/discover.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from openid.consumer import html_parse
1818

1919
OPENID_1_0_NS = 'http://openid.net/xmlns/1.0'
20-
OPENID_IDP_2_0_TYPE = 'http://openid.net/server/2.0'
21-
OPENID_2_0_TYPE = 'http://openid.net/signon/2.0'
20+
OPENID_IDP_2_0_TYPE = 'http://specs.openid.net/auth/2.0/server'
21+
OPENID_2_0_TYPE = 'http://specs.openid.net/auth/2.0/signon'
2222
OPENID_1_1_TYPE = 'http://openid.net/signon/1.1'
2323
OPENID_1_0_TYPE = 'http://openid.net/signon/1.0'
2424

@@ -62,7 +62,7 @@ def preferredNamespace(self):
6262

6363
def supportsType(self, type_uri):
6464
"""Does this endpoint support this type?"""
65-
return ((type_uri == OPENID_2_0_MESSAGE_NS and
65+
return ((type_uri == OPENID_2_0_TYPE and
6666
OPENID_IDP_2_0_TYPE in self.type_uris) or
6767
self.usesExtension(type_uri))
6868

‎openid/message.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ElementTree = None
1919

2020
# This doesn't REALLY belong here, but where is better?
21-
IDENTIFIER_SELECT = "http://openid.net/identifier_select/2.0"
21+
IDENTIFIER_SELECT = 'http://specs.openid.net/auth/2.0/identifier_select'
2222

2323
# URI for Simple Registration extension, the only commonly deployed
2424
# OpenID 1.x extension, and so a special case
@@ -28,7 +28,7 @@
2828
OPENID1_NS = 'http://openid.net/signon/1.0'
2929

3030
# The OpenID 2.0 namespace URI
31-
OPENID2_NS = 'http://openid.net/signon/2.0'
31+
OPENID2_NS = 'http://specs.openid.net/auth/2.0'
3232

3333
# The namespace consisting of pairs with keys that are prefixed with
3434
# "openid." but not in another namespace.

‎openid/test/data/test_discover/openid2_xrds.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
>
55
<XRD>
66
<Service priority="10">
7-
<Type>http://openid.net/signon/2.0</Type>
7+
<Type>http://specs.openid.net/auth/2.0/signon</Type>
88
<URI>http://www.myopenid.com/server</URI>
99
<LocalID>http://smoker.myopenid.com/</LocalID>
1010
</Service>

‎openid/test/data/test_discover/openid2_xrds_no_local_id.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
>
55
<XRD>
66
<Service priority="10">
7-
<Type>http://openid.net/signon/2.0</Type>
7+
<Type>http://specs.openid.net/auth/2.0/signon</Type>
88
<URI>http://www.myopenid.com/server</URI>
99
</Service>
1010
</XRD>

‎openid/test/data/test_discover/openid_1_and_2_xrds.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<XRD>
77

88
<Service priority="10">
9-
<Type>http://openid.net/signon/2.0</Type>
9+
<Type>http://specs.openid.net/auth/2.0/signon</Type>
1010
<Type>http://openid.net/signon/1.1</Type>
1111
<URI>http://www.myopenid.com/server</URI>
1212
<LocalID>http://smoker.myopenid.com/</LocalID>

‎openid/test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<XRD>
77

88
<Service priority="10">
9-
<Type>http://openid.net/signon/2.0</Type>
9+
<Type>http://specs.openid.net/auth/2.0/signon</Type>
1010
<Type>http://openid.net/signon/1.0</Type>
1111
<Type>http://openid.net/signon/1.1</Type>
1212
<URI>http://www.myopenid.com/server</URI>

‎openid/test/data/test_discover/yadis_2_bad_local_id.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<XRD>
77

88
<Service priority="10">
9-
<Type>http://openid.net/signon/2.0</Type>
9+
<Type>http://specs.openid.net/auth/2.0/signon</Type>
1010
<URI>http://www.myopenid.com/server</URI>
1111
<LocalID>http://smoker.myopenid.com/</LocalID>
1212
<LocalID>http://localid.mismatch.invalid/</LocalID>

‎openid/test/data/test_discover/yadis_2entries_idp.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<CanonicalID>=!1000</CanonicalID>
88

99
<Service priority="10">
10-
<Type>http://openid.net/signon/2.0</Type>
10+
<Type>http://specs.openid.net/auth/2.0/signon</Type>
1111
<URI>http://www.myopenid.com/server</URI>
1212
<openid:LocalID>http://smoker.myopenid.com/</openid:LocalID>
1313
</Service>
1414

1515
<Service priority="20">
16-
<Type>http://openid.net/server/2.0</Type>
16+
<Type>http://specs.openid.net/auth/2.0/server</Type>
1717
<URI>http://www.livejournal.com/openid/server.bml</URI>
1818
</Service>
1919

‎openid/test/data/test_discover/yadis_idp.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
>
66
<XRD>
77
<Service priority="10">
8-
<Type>http://openid.net/server/2.0</Type>
8+
<Type>http://specs.openid.net/auth/2.0/server</Type>
99
<URI>http://www.myopenid.com/server</URI>
1010
</Service>
1111
</XRD>

‎openid/test/data/test_discover/yadis_idp_delegate.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
>
66
<XRD>
77
<Service>
8-
<Type>http://openid.net/server/2.0</Type>
8+
<Type>http://specs.openid.net/auth/2.0/server</Type>
99
<URI>http://www.myopenid.com/server</URI>
1010
<openid:Delegate>http://smoker.myopenid.com/</openid:Delegate>
1111
</Service>

0 commit comments

Comments
 (0)