diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-12-11 06:38:23 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-12-11 06:38:23 -0500 |
commit | d9bf22a0e29c2a70049443a0ae8521a2c0492c8b (patch) | |
tree | c7599a9169d5def7df56c480ad6d67f312443d6f /models/openid-php-openid-782224d/Tests/Auth/Yadis/data | |
download | elgg-d9bf22a0e29c2a70049443a0ae8521a2c0492c8b.tar.gz elgg-d9bf22a0e29c2a70049443a0ae8521a2c0492c8b.tar.bz2 |
initial commit for git repository
Diffstat (limited to 'models/openid-php-openid-782224d/Tests/Auth/Yadis/data')
24 files changed, 1032 insertions, 0 deletions
diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/README b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/README new file mode 100644 index 000000000..3739cf1c7 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/README @@ -0,0 +1,12 @@ +delegated-20060809.xrds - results from proxy.xri.net, determined by + Drummond and Kevin to be incorrect. +delegated-20060809-r1.xrds - Drummond's 1st correction +delegated-20060809-r2.xrds - Drummond's 2nd correction + +spoofs: keturn's (=!E4)'s attempts to log in with Drummond's i-number (=!D2) +spoof1.xrds +spoof2.xrds +spoof3.xrds - attempt to steal @!C0!D2 by having "at least one" CanonicalID + match the $res service ProviderID. + +ref.xrds - resolving @ootao*test.ref, which refers to a neustar XRI. diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/accept.txt b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/accept.txt new file mode 100644 index 000000000..0853321a8 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/accept.txt @@ -0,0 +1,118 @@ +# Accept: [Accept: header value from RFC2616, +# http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html] +# Available: [whitespace-separated content types] +# Expected: [Accept-header like list, containing the available content +# types with their q-values] + +Accept: */* +Available: text/plain +Expected: text/plain; q=1.0 + +Accept: */* +Available: text/plain, text/html +Expected: text/plain; q=1.0, text/html; q=1.0 + +# The order matters +Accept: */* +Available: text/html, text/plain +Expected: text/html; q=1.0, text/plain; q=1.0 + +Accept: text/*, */*; q=0.9 +Available: text/plain, image/jpeg +Expected: text/plain; q=1.0, image/jpeg; q=0.9 + +Accept: text/*, */*; q=0.9 +Available: image/jpeg, text/plain +Expected: text/plain; q=1.0, image/jpeg; q=0.9 + +# wildcard subtypes still reject differing main types +Accept: text/* +Available: image/jpeg, text/plain +Expected: text/plain; q=1.0 + +Accept: text/html +Available: text/html +Expected: text/html; q=1.0 + +Accept: text/html, text/* +Available: text/html +Expected: text/html; q=1.0 + +Accept: text/html, text/* +Available: text/plain, text/html +Expected: text/plain; q=1.0, text/html; q=1.0 + +Accept: text/html, text/*; q=0.9 +Available: text/plain, text/html +Expected: text/html; q=1.0, text/plain; q=0.9 + +# If a more specific type has a higher q-value, then the higher value wins +Accept: text/*; q=0.9, text/html +Available: text/plain, text/html +Expected: text/html; q=1.0, text/plain; q=0.9 + +Accept: */*, text/*; q=0.9, text/html; q=0.1 +Available: text/plain, text/html, image/monkeys +Expected: image/monkeys; q=1.0, text/plain; q=0.9, text/html; q=0.1 + +Accept: text/*, text/html; q=0 +Available: text/html +Expected: + +Accept: text/*, text/html; q=0 +Available: text/html, text/plain +Expected: text/plain; q=1.0 + +Accept: text/html +Available: text/plain +Expected: + +Accept: application/xrds+xml, text/html; q=0.9 +Available: application/xrds+xml, text/html +Expected: application/xrds+xml; q=1.0, text/html; q=0.9 + +Accept: application/xrds+xml, */*; q=0.9 +Available: application/xrds+xml, text/html +Expected: application/xrds+xml; q=1.0, text/html; q=0.9 + +Accept: application/xrds+xml, application/xhtml+xml; q=0.9, text/html; q=0.8, text/xml; q=0.7 +Available: application/xrds+xml, text/html +Expected: application/xrds+xml; q=1.0, text/html; q=0.8 + +# See http://www.rfc-editor.org/rfc/rfc3023.txt, section A.13 +Accept: application/xrds +Available: application/xrds+xml +Expected: + +Accept: application/xrds+xml +Available: application/xrds +Expected: + +Accept: application/xml +Available: application/xrds+xml +Expected: + +Available: application/xrds+xml +Accept: application/xml +Expected: + + + +################################################# +# The tests below this line are documentation of how this library +# works. If the implementation changes, it's acceptable to change the +# test to reflect that. These are specified so that we can make sure +# that the current implementation actually works the way that we +# expect it to given these inputs. + +Accept: text/html;level=1 +Available: text/html +Expected: text/html; q=1.0 + +Accept: text/html; level=1, text/html; level=9; q=0.1 +Available: text/html +Expected: text/html; q=1.0 + +Accept: text/html; level=9; q=0.1, text/html; level=1 +Available: text/html +Expected: text/html; q=1.0 diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.multi.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.multi.xrds new file mode 100644 index 000000000..1bc95dea9 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.multi.xrds @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns:openid="http://openid.net/xmlns/1.0" + xmlns="xri://$xrd*($v*2.0)"> + <XRD> + + <Service priority="2"> + <Type>http://openid.net/signon/1.1</Type> + <URI>http://www.myopenid.com/server</URI> + <openid:Delegate>http://frank.myopenid.com/</openid:Delegate> + </Service> + + </XRD> + <XRD> + + <Service priority="1"> + <Type>http://bar.com/</Type> + <URI>http://bar.com/server</URI> + </Service> + + <Service priority="2"> + <Type>http://foo.com</Type> + <URI>http://foo.com/server</URI> + </Service> + + </XRD> + <XRD> + + <Service priority="0"> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://www.myopenid.com/server</URI> + <openid:Delegate>http://brian.myopenid.com/</openid:Delegate> + </Service> + + </XRD> +</xrds:XRDS> + diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.multi_uri.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.multi_uri.xrds new file mode 100644 index 000000000..fce5ef72f --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.multi_uri.xrds @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns:openid="http://openid.net/xmlns/1.0" + xmlns="xri://$xrd*($v*2.0)"> + <XRD> + + <Service> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://www.myopenid.com/server</URI> + <URI>http://example.com/server</URI> + </Service> + + </XRD> +</xrds:XRDS> + diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.xrds new file mode 100644 index 000000000..c7539fe1b --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian.xrds @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns:openid="http://openid.net/xmlns/1.0" + xmlns="xri://$xrd*($v*2.0)"> + <XRD> + + <Service priority="0"> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://www.myopenid.com/server</URI> + <openid:Delegate>http://brian.myopenid.com/</openid:Delegate> + </Service> + + </XRD> +</xrds:XRDS> + diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian_priority.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian_priority.xrds new file mode 100644 index 000000000..273077dfa --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/brian_priority.xrds @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns:openid="http://openid.net/xmlns/1.0" + xmlns="xri://$xrd*($v*2.0)"> + <XRD> + + <Service priority="2"> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://www.schtuff.com/?action=openid_server</URI> + <openid:Delegate>http://users.schtuff.com/brian</openid:Delegate> + </Service> + + <Service priority="1"> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://www.myopenid.com/server</URI> + <openid:Delegate>http://brian.myopenid.com/</openid:Delegate> + </Service> + + </XRD> +</xrds:XRDS> + diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809-r1.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809-r1.xrds new file mode 100644 index 000000000..f994b140e --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809-r1.xrds @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://@ootao*test1" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*ootao</Query> + <Status code="100"/> + <Expires>2006-08-09T22:07:13.000Z</Expires> + <ProviderID>xri://@</ProviderID> + <LocalID priority="10">!5BAD.2AA.3C72.AF46</LocalID> + <CanonicalID priority="10">@!5BAD.2AA.3C72.AF46</CanonicalID> + <Service priority="10"> + <Type>xri://$res*auth*($v*2.0)</Type> + <ProviderID>xri://!!1003</ProviderID> + <MediaType>application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://resolve.ezibroker.net/resolve/@ootao/</URI> + </Service> + <Service priority="10"> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*test1</Query> + <Status code="100">SUCCESS</Status> + <ProviderID>xri://!!1003</ProviderID> + <LocalID>!0000.0000.3B9A.CA01</LocalID> + <CanonicalID>@!5BAD.2AA.3C72.AF46!0000.0000.3B9A.CA01</CanonicalID> + <Service> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809-r2.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809-r2.xrds new file mode 100644 index 000000000..68c08dc44 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809-r2.xrds @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://@ootao*test1" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*ootao</Query> + <Status code="100"/> + <Expires>2006-08-09T22:07:13.000Z</Expires> + <ProviderID>xri://@</ProviderID> + <LocalID priority="10">!5BAD.2AA.3C72.AF46</LocalID> + <CanonicalID priority="10">@!5BAD.2AA.3C72.AF46</CanonicalID> + <Service priority="10"> + <Type>xri://$res*auth*($v*2.0)</Type> + <ProviderID>xri://@!5BAD.2AA.3C72.AF46</ProviderID> + <MediaType>application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://resolve.ezibroker.net/resolve/@ootao/</URI> + </Service> + <Service priority="10"> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*test1</Query> + <Status code="100">SUCCESS</Status> + <ProviderID>xri://@!5BAD.2AA.3C72.AF46</ProviderID> + <LocalID>!0000.0000.3B9A.CA01</LocalID> + <CanonicalID>@!5BAD.2AA.3C72.AF46!0000.0000.3B9A.CA01</CanonicalID> + <Service> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809.xrds new file mode 100644 index 000000000..073ee6889 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/delegated-20060809.xrds @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://@ootao*test1" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*ootao</Query> + <Status code="100"/> + <Expires>2006-08-09T22:07:13.000Z</Expires> + <ProviderID>xri://@</ProviderID> + <LocalID priority="10">!5BAD.2AA.3C72.AF46</LocalID> + <CanonicalID priority="10">@!5BAD.2AA.3C72.AF46</CanonicalID> + <Service priority="10"> + <Type>xri://$res*auth*($v*2.0)</Type> + <ProviderID/> + <MediaType>application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://resolve.ezibroker.net/resolve/@ootao/</URI> + </Service> + <Service priority="10"> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*test1</Query> + <Status code="100">SUCCESS</Status> + <ProviderID>xri://!!1003</ProviderID> + <LocalID>!0000.0000.3B9A.CA01</LocalID> + <CanonicalID>@!5BAD.2AA.3C72.AF46!0000.0000.3B9A.CA01</CanonicalID> + <Service> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/example-xrds.xml b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/example-xrds.xml new file mode 100644 index 000000000..101ba3bd5 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/example-xrds.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Sample XRDS file at: NAME --> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns="xri://$xrd*($v*2.0)"> + <XRD> + + <Service priority="0"> + <Type>http://example.com/</Type> + <URI>http://www.openidenabled.com/</URI> + </Service> + + </XRD> +</xrds:XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/no-xrd.xml b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/no-xrd.xml new file mode 100644 index 000000000..ca66f7359 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/no-xrd.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns:openid="http://openid.net/xmlns/1.0" + xmlns:typekey="http://typekey.com/xmlns/1.0" + xmlns="xri://$xrd*($v*2.0)"> +</xrds:XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/not-xrds.xml b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/not-xrds.xml new file mode 100644 index 000000000..7f5bfd511 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/not-xrds.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<x></x> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/pip.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/pip.xrds new file mode 100644 index 000000000..ca271ab19 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/pip.xrds @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns:openid="http://openid.net/xmlns/1.0" + xmlns="xri://$xrd*($v*2.0)"> + <XRD> + + <Service priority="10"> + <Type>http://openid.net/signon/1.1</Type> + <Type>http://openid.net/sreg/1.0</Type> + <URI>https://pip.verisignlabs.com/server</URI> + </Service> + + <Service priority="20"> + <Type>http://openid.net/signon/1.0</Type> + <Type>http://openid.net/sreg/1.0</Type> + <URI>https://pip.verisignlabs.com/server</URI> + </Service> + + </XRD> +</xrds:XRDS> + diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/prefixsometimes.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/prefixsometimes.xrds new file mode 100644 index 000000000..5522a6e5e --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/prefixsometimes.xrds @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://@ootao*test1" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*ootao</Query> + <Status code="100"/> + <Expires>2006-08-09T22:07:13.000Z</Expires> + <ProviderID>xri://@</ProviderID> + <LocalID priority="10">!5BAD.2AA.3C72.AF46</LocalID> + <CanonicalID priority="10">@!5BAD.2AA.3C72.AF46</CanonicalID> + <Service priority="10"> + <Type>xri://$res*auth*($v*2.0)</Type> + <ProviderID>xri://@!5BAD.2AA.3C72.AF46</ProviderID> + <MediaType>application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://resolve.ezibroker.net/resolve/@ootao/</URI> + </Service> + <Service priority="10"> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*test1</Query> + <Status code="100">SUCCESS</Status> + <ProviderID>xri://@!5BAD.2AA.3C72.AF46</ProviderID> + <LocalID>!0000.0000.3B9A.CA01</LocalID> + <CanonicalID>xri://@!5BAD.2AA.3C72.AF46!0000.0000.3B9A.CA01</CanonicalID> + <Service> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/ref.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/ref.xrds new file mode 100644 index 000000000..69cf683db --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/ref.xrds @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://@ootao*test.ref" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*ootao</Query> + <Status code="100"/> + <Expires>2006-08-15T18:56:09.000Z</Expires> + <ProviderID>xri://@</ProviderID> + <LocalID priority="10">!5BAD.2AA.3C72.AF46</LocalID> + <CanonicalID priority="10">@!5BAD.2AA.3C72.AF46</CanonicalID> + <Service priority="10"> + <Type>xri://$res*auth*($v*2.0)</Type> + <ProviderID/> + <MediaType>application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://resolve.ezibroker.net/resolve/@ootao/</URI> + </Service> + <Service priority="10"> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*test.ref</Query> + <Status code="100">SUCCESS</Status> + <ProviderID>xri://!!1003</ProviderID> + <LocalID>!0000.0000.3B9A.CA03</LocalID> + <CanonicalID>@!5BAD.2AA.3C72.AF46!0000.0000.3B9A.CA03</CanonicalID> + <Ref>@!BAE.A650.823B.2475</Ref> + <Service> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> + <XRDS ref="xri://@!BAE.A650.823B.2475" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>!BAE.A650.823B.2475</Query> + <Status code="100"/> + <Expires>2006-08-15T18:56:10.000Z</Expires> + <ProviderID>xri://@</ProviderID> + <LocalID priority="10">!BAE.A650.823B.2475</LocalID> + <CanonicalID priority="10">@!BAE.A650.823B.2475</CanonicalID> + <Service priority="10"> + <Type select="true">(+wdnc)</Type> + <ProviderID/> + <Path select="true">(+wdnc)</Path> + <URI append="none" priority="10">http://www.tcpacompliance.us</URI> + </Service> + <Service priority="10"> + <Type match="content" select="true">xri://$res*auth*($v*2.0)</Type> + <ProviderID/> + <MediaType match="content" select="false">application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://dev.dready.org/cgi-bin/xri</URI> + </Service> + <Service priority="10"> + <Type match="content" select="true">(+i-name)</Type> + <ProviderID/> + <Path match="content" select="true">(+i-name)</Path> + <URI append="none" priority="10">http://www.inames.net</URI> + </Service> + <Service priority="10"> + <Type select="true">xri://+i-service*(+contact)*($v*1.0)</Type> + <Type match="default" select="false"/> + <ProviderID>xri://!!1001</ProviderID> + <Path select="true">(+contact)</Path> + <Path match="null" select="false"/> + <MediaType select="false">text/html</MediaType> + <MediaType match="default" select="false"/> + <URI append="none" priority="10">http://www.neustar.biz</URI> + </Service> + </XRD> + </XRDS> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>!BAE.A650.823B.2475</Query> + <Status code="100"/> + <Expires>2006-08-15T18:56:10.000Z</Expires> + <ProviderID>xri://@</ProviderID> + <LocalID priority="10">!BAE.A650.823B.2475</LocalID> + <CanonicalID priority="10">@!BAE.A650.823B.2475</CanonicalID> + <Service priority="10"> + <Type select="true">(+wdnc)</Type> + <ProviderID/> + <Path select="true">(+wdnc)</Path> + <URI append="none" priority="10">http://www.tcpacompliance.us</URI> + </Service> + <Service priority="10"> + <Type match="content" select="true">xri://$res*auth*($v*2.0)</Type> + <ProviderID/> + <MediaType match="content" select="false">application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://dev.dready.org/cgi-bin/xri</URI> + </Service> + <Service priority="10"> + <Type match="content" select="true">(+i-name)</Type> + <ProviderID/> + <Path match="content" select="true">(+i-name)</Path> + <URI append="none" priority="10">http://www.inames.net</URI> + </Service> + <Service priority="10"> + <Type select="true">xri://+i-service*(+contact)*($v*1.0)</Type> + <Type match="default" select="false"/> + <ProviderID>xri://!!1001</ProviderID> + <Path select="true">(+contact)</Path> + <Path match="null" select="false"/> + <MediaType select="false">text/html</MediaType> + <MediaType match="default" select="false"/> + <URI append="none" priority="10">http://www.neustar.biz</URI> + </Service> + </XRD> +</XRDS>
\ No newline at end of file diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/sometimesprefix.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/sometimesprefix.xrds new file mode 100644 index 000000000..eff755543 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/sometimesprefix.xrds @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://@ootao*test1" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*ootao</Query> + <Status code="100"/> + <Expires>2006-08-09T22:07:13.000Z</Expires> + <ProviderID>xri://@</ProviderID> + <LocalID priority="10">!5BAD.2AA.3C72.AF46</LocalID> + <CanonicalID priority="10">xri://@!5BAD.2AA.3C72.AF46</CanonicalID> + <Service priority="10"> + <Type>xri://$res*auth*($v*2.0)</Type> + <ProviderID>xri://@!5BAD.2AA.3C72.AF46</ProviderID> + <MediaType>application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://resolve.ezibroker.net/resolve/@ootao/</URI> + </Service> + <Service priority="10"> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*test1</Query> + <Status code="100">SUCCESS</Status> + <ProviderID>xri://@!5BAD.2AA.3C72.AF46</ProviderID> + <LocalID>!0000.0000.3B9A.CA01</LocalID> + <CanonicalID>@!5BAD.2AA.3C72.AF46!0000.0000.3B9A.CA01</CanonicalID> + <Service> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID/> + <URI append="qxri" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof1.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof1.xrds new file mode 100644 index 000000000..8e870c815 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof1.xrds @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://=keturn*isDrummond" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*keturn</Query> + <ProviderID>xri://=</ProviderID> + <LocalID>!E4</LocalID> + <CanonicalID>=!E4</CanonicalID> + + <Service> + <Type>xri://$res*auth*($v*2.0)</Type> + <URI>http://keturn.example.com/resolve/</URI> + <ProviderID>=!E4</ProviderID> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*isDrummond</Query> + <ProviderID>=!E4</ProviderID> + <LocalID>!D2</LocalID> + <CanonicalID>=!D2</CanonicalID> + <Service> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://keturn.example.com/openid</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof2.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof2.xrds new file mode 100644 index 000000000..7547561e1 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof2.xrds @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://=keturn*isDrummond" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*keturn</Query> + <ProviderID>xri://=</ProviderID> + <LocalID>!E4</LocalID> + <CanonicalID>=!E4</CanonicalID> + + <Service> + <Type>xri://$res*auth*($v*2.0)</Type> + <URI>http://keturn.example.com/resolve/</URI> + <ProviderID>xri://=</ProviderID> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*isDrummond</Query> + <ProviderID>xri://=</ProviderID> + <LocalID>!D2</LocalID> + <CanonicalID>=!D2</CanonicalID> + <Service> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://keturn.example.com/openid</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof3.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof3.xrds new file mode 100644 index 000000000..f4c43c9b4 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/spoof3.xrds @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://=keturn*isDrummond" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*keturn</Query> + <ProviderID>xri://@</ProviderID> + <LocalID>@E4</LocalID> + <CanonicalID>@!E4</CanonicalID> + + <Service> + <Type>xri://$res*auth*($v*2.0)</Type> + <URI>http://keturn.example.com/resolve/</URI> + <ProviderID>@!E4</ProviderID> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*is</Query> + <ProviderID>@!E4</ProviderID> + <LocalID>!D2</LocalID> + <CanonicalID>=!C0</CanonicalID> + <CanonicalID>=!E4!01</CanonicalID> + <Service> + <Type>xri://$res*auth*($v*2.0)</Type> + <URI>http://keturn.example.com/resolve/</URI> + <ProviderID>@!C0</ProviderID> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*drummond</Query> + <ProviderID>@!C0</ProviderID> + <LocalID>!D2</LocalID> + <CanonicalID>@!C0!D2</CanonicalID> + <Service> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://keturn.example.com/openid</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/subsegments.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/subsegments.xrds new file mode 100644 index 000000000..11d2e9122 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/subsegments.xrds @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRDS ref="xri://=nishitani*masaki" xmlns="xri://$xrds"> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*nishitani</Query> + <Status code="100"/> + <Expires>2007-12-25T11:33:39.000Z</Expires> + <ProviderID>xri://=</ProviderID> + <LocalID priority="10">!E117.EF2F.454B.C707</LocalID> + <CanonicalID priority="10">=!E117.EF2F.454B.C707</CanonicalID> + <Service priority="10"> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID>xri://!!1003!103</ProviderID> + <URI append="none" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + <Service priority="10"> + <Type select="true">xri://$res*auth*($v*2.0)</Type> + <ProviderID>xri://!!1003!103</ProviderID> + <MediaType>application/xrds+xml;trust=none</MediaType> + <URI priority="10">http://resolve.ezibroker.net/resolve/=nishitani/</URI> + </Service> + <Service priority="1"> + <Type match="content" select="true">xri://+i-service*(+forwarding)*($v*1.0)</Type> + <Type match="null" select="false"/> + <ProviderID>xri://!!1003!103</ProviderID> + <Path match="content">(+index)</Path> + <Path match="default"/> + <URI append="qxri" priority="1">http://linksafe-forward.ezibroker.net/forwarding/</URI> + </Service> + </XRD> + <XRD xmlns="xri://$xrd*($v*2.0)"> + <Query>*masaki</Query> + <Status code="100">SUCCESS</Status> + <ProviderID>xri://!!1003</ProviderID> + <LocalID>!0000.0000.3B9A.CA01</LocalID> + <CanonicalID>=!E117.EF2F.454B.C707!0000.0000.3B9A.CA01</CanonicalID> + <Service> + <Type select="true">http://openid.net/signon/1.0</Type> + <ProviderID>xri://!!1003!103</ProviderID> + <URI append="none" priority="1">https://linksafe.ezibroker.net/server/</URI> + </Service> + <Service> + <Type select="true">xri://+i-service*(+contact)*($v*1.0)</Type> + <Type match="null"/> + <ProviderID>xri://!!1003!103</ProviderID> + <Path select="true">(+contact)</Path> + <Path match="null"/> + <URI append="authority" priority="1">http://linksafe-contact.ezibroker.net/contact/</URI> + </Service> + <Service priority="1"> + <Type match="content" select="true">xri://+i-service*(+forwarding)*($v*1.0)</Type> + <Type match="null" select="false"/> + <ProviderID>xri://!!1003!103</ProviderID> + <Path match="content">(+index)</Path> + <Path match="default"/> + <URI append="qxri" priority="1">http://linksafe-forward.ezibroker.net/forwarding/</URI> + </Service> + </XRD> +</XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-discover.txt b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-discover.txt new file mode 100644 index 000000000..7ec9b8788 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-discover.txt @@ -0,0 +1,137 @@ +equiv +Status: 200 OK +Content-Type: text/html + +<html> +<head> +<meta http-equiv="YADIS_HEADER" content="URL_BASE/xrds"> +<title>Joe Schmoe's Homepage</title> +</head> +<body> +<h1>Joe Schmoe's Homepage</h1> +<p>Blah blah blah blah blah blah blah</p> +</body> +</html> + +header +Status: 200 OK +Content-Type: text/html +YADIS_HEADER: URL_BASE/xrds + +<html> +<head> +<title>Joe Schmoe's Homepage</title> +</head> +<body> +<h1>Joe Schmoe's Homepage</h1> +<p>Blah blah blah blah blah blah blah</p> +</body> + +xrds +Status: 200 OK +Content-Type: application/xrds+xml + +<XRDS Content> + +xrds_ctparam +Status: 200 OK +Content-Type: application/xrds+xml; charset=UTF8 + +<XRDS Content> + +xrds_ctcase +Status: 200 OK +Content-Type: appliCATION/XRDS+xml + +<XRDS Content> + +xrds_html +Status: 200 OK +Content-Type: text/html + +<XRDS Content> + +redir_equiv +Status: 302 Found +Content-Type: text/plain +Location: URL_BASE/equiv + +You are presently being redirected. + +redir_header +Status: 302 Found +Content-Type: text/plain +Location: URL_BASE/header + +You are presently being redirected. + +redir_xrds +Status: 302 Found +Content-Type: application/xrds+xml +Location: URL_BASE/xrds + +<XRDS Content> + +redir_xrds_html +Status: 302 Found +Content-Type: text/plain +Location: URL_BASE/xrds_html + +You are presently being redirected. + +redir_redir_equiv +Status: 302 Found +Content-Type: text/plain +Location: URL_BASE/redir_equiv + +You are presently being redirected. + +lowercase_header +Status: 200 OK +Content-Type: text/html +x-xrds-location: URL_BASE/xrds + +<html> +<head> +<title>Joe Schmoe's Homepage</title> +</head> +<body> +<h1>Joe Schmoe's Homepage</h1> +<p>Blah blah blah blah blah blah blah</p> +</body> + +404_server_response +Status: 404 Not Found + +EEk! + +500_server_response +Status: 500 Server error + +EEk! + +201_server_response +Status: 201 Created + +EEk! + +404_with_header +Status: 404 Not Found +YADIS_HEADER: URL_BASE/xrds + +EEk! + +404_with_meta +Status: 404 Not Found +Content-Type: text/html + +<html> +<head> +<meta http-equiv="YADIS_HEADER" content="URL_BASE/xrds"> +<title>Joe Schmoe's Homepage</title> +</head> +<body> +<h1>Joe Schmoe's Homepage</h1> +<p>Blah blah blah blah blah blah blah</p> +</body> +</html> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-parsehtml.txt b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-parsehtml.txt new file mode 100644 index 000000000..752ad091d --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-parsehtml.txt @@ -0,0 +1,149 @@ +found +<!-- minimal well-formed success case --> +<html><head><meta http-equiv="X-XRDS-Location" content="found"></head></html> + +found +<!-- minimal well-formed success case, xhtml closing, whitespace --> +<html><head><meta http-equiv="X-XRDS-Location" content="found" /></head></html> + +found +<!-- minimal well-formed success case, xhtml closing, no whitespace --> +<html><head><meta http-equiv="X-XRDS-Location" content="found"/></head></html> + +found +<!-- minimal success case --> +<html><head><meta http-equiv="X-XRDS-Location" content="found"> + +found +<!-- ignore bogus top-level tags --> +</porky><html><head><meta http-equiv="X-XRDS-Location" content="found"> + +found +<!-- Case folding for header name --> +<html><head><meta http-equiv="x-xrds-location" content="found"> + +found +<!-- missing <html> tag --> +<head><meta http-equiv="X-XRDS-Location" content="found"> + +found +<!-- javascript in head --> +<html><head><script type="text/javascript">document.write("<body>");</script><META http-equiv="X-XRDS-Location" content="found"> + +EOF +<!-- javascript in head --> +<html><head><script type="text/javascript">document.write("<body>");<META http-equiv="X-XRDS-Location" content="found"> + +found +<!-- case folding for tag names --> +<html><head><META http-equiv="X-XRDS-Location" content="found"> + +found +<!-- Stop after first one found --> +<html><head> +<meta http-equiv="x-xrds-location" content="found"> +<meta http-equiv="x-xrds-location" content="not-found"> + +& +<!-- standard entity --> +<head><meta http-equiv="X-XRDS-Location" content="&"> + +found +<!-- hex entity --> +<html> + <head> + <meta http-equiv="X-XRDS-Location" content="found"> + </head> +</html> + +found +<!-- decimal entity --> +<html> + <head> + <meta http-equiv="X-XRDS-Location" content="found"> + </head> +</html> + +/ +<!-- hex entity --> +<html> + <head> + <meta http-equiv="X-XRDS-Location" content="/"> + </head> +</html> + + +<!-- empty string --> +<html><head><meta http-equiv="X-XRDS-Location" content=""> + +EOF +<!-- No markup, except this comment --> + +None +<!-- No meta, just standard HTML --> +<html> + <head> + <title>A boring document</title> + </head> + <body> + <h1>A boring document</h1> + <p>There's really nothing interesting about this</p> + </body> +</html> + +EOF +<!-- No <html> or <head> --> +<meta http-equiv="X-XRDS-Location" content="found"> + +EOF +<!-- No <head> tag --> +<html><meta http-equiv="X-XRDS-Location" content="found"> + +None +<!-- No <html> or <head> and a <body> --> +<body><meta http-equiv="X-XRDS-Location" content="found"> + +None +<!-- <head> and <html> reversed --> +<head><html><meta http-equiv="X-XRDS-Location" content="found"> + +None +<!-- <meta> is inside of <body> --> +<html><head><body><meta http-equiv="X-XRDS-Location" content="found"> + +None +<!-- <meta> is inside comment --> +<html> + <head> + <!--<meta http-equiv="X-XRDS-Location" content="found">--> + </head> +</html> + +None +<!-- <meta> is inside of <body> --> +<html> + <head> + <title>Someone's blog</title> + </head> + <body> + <h1>My blog</h1> + <p>This is my blog</p> + <h2>Comments</h2> + <p><meta http-equiv="X-XRDS-Location" content="found"></p> + </body> +</html> + +None +<!-- short head tag --> +<html><head/> +<meta http-equiv="X-XRDS-Location" content="found"> + +None +<!-- <body> comes first --> +<body><html><head> +<meta http-equiv="X-XRDS-Location" content="found"> + +None +<!-- </body> comes first --> +</body><html><head> +<meta http-equiv="X-XRDS-Location" content="found"> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-xrd.xml b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-xrd.xml new file mode 100644 index 000000000..60e5ca7b1 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/test1-xrd.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns:openid="http://openid.net/xmlns/1.0" + xmlns:typekey="http://typekey.com/xmlns/1.0" + xmlns="xri://$xrd*($v*2.0)"> + <XRD> + + <Service priority="0"> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://www.myopenid.com/server</URI> + <openid:Delegate>http://josh.myopenid.com/</openid:Delegate> + </Service> + + <Service priority="20"> + <Type>http://lid.netmesh.org/sso/2.0b5</Type> + <Type>http://lid.netmesh.org/2.0b5</Type> + <URI>http://mylid.net/josh</URI> + </Service> + + <Service priority="10"> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://www.livejournal.com/openid/server.bml</URI> + <openid:Delegate>http://www.livejournal.com/users/nedthealpaca/</openid:Delegate> + </Service> + + <Service priority="15"> + <Type>http://typekey.com/services/1.0</Type> + <typekey:MemberName>joshhoyt</typekey:MemberName> + </Service> + + <Service priority="5"> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://www.schtuff.com/openid</URI> + <openid:Delegate>http://users.schtuff.com/josh</openid:Delegate> + </Service> + + </XRD> +</xrds:XRDS> diff --git a/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/uri_priority.xrds b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/uri_priority.xrds new file mode 100644 index 000000000..b1a2f65c3 --- /dev/null +++ b/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/uri_priority.xrds @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xrds:XRDS + xmlns:xrds="xri://$xrds" + xmlns:openid="http://openid.net/xmlns/1.0" + xmlns="xri://$xrd*($v*2.0)"> + <XRD> + + <Service> + <Type>http://openid.net/signon/1.0</Type> + <URI>http://no.priority/</URI> + <URI priority="1">http://one.priority/</URI> + <URI priority="0">http://zero.priority/</URI> + </Service> + + </XRD> +</xrds:XRDS> |