Closed jsumners closed 6 years ago
No, it's correct. urn
can not be a scheme on it's own. See RFC 2141 Section 2.
Um, your citation is exactly saying that urn
is the scheme:
All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):
<URN> ::= "urn:" <NID> ":" <NSS>
where
is the Namespace Identifier, and is the Namespace Specific String. The leading "urn:" sequence is case-insensitive. The Namespace ID determines the syntactic interpretation of the Namespace Specific String (as discussed in [1]).
Further, see https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Examples
urn:example:mammal:monotreme:echidna └┬┘ └──────────────┬───────────────┘ scheme path
Actually, you're right. RFC 2141 Appendix A states:
The URN syntax has been defined so that URNs can be used in places where URLs are expected. A resolver that conforms to the current URL syntax specification [3] will extract a scheme value of "urn:" rather than a scheme value of "urn:\<nid>".
My confusion was that <URN>
(which includes <NID>
) was the scheme. I'll try to get to it in the next couple days.
I understand. It's a very confusing bit of the spec. I'm only versed on it currently because I'm digging in to SAML garbage.
This has now been fixed.
Given
urn:oasis:names:tc:SAML:2.0:assertion
as the URI, the result of.parse
is:This is incorrect. The scheme should be
urn
and the path should beoasis:names:tc:SAML:2.0:assertion
.