-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checking the URI before matching #1237
Checking the URI before matching #1237
Conversation
Oh, haven't seen this before raising my issue. |
URNs shall be accepted too. See example at https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-desktop-app-registration The URN |
I fixed the |
https://datatracker.ietf.org/doc/html/rfc6749#section-3.1.2
So scheme is required. |
I see Microsoft mentioning urns but don't see anything in the official specs about urn support. Just custom app schemes. We always follow the official RFCs so I'm not concerned with urns at this time but if someone can find info in an oauth RFC that specifies we should support urns, we will of course include this. |
Actually, URNs are more likely used for native apps. |
https://datatracker.ietf.org/doc/html/rfc6749#section-3.1.2
https://datatracker.ietf.org/doc/html/rfc3986#section-1.1.3
https://datatracker.ietf.org/doc/html/rfc3986#section-3
So URNs can also be redirect URIs. |
I'm not sure this is more common but would happily be proved wrong. As I said before though, I would really want to see something about URNs in the Oauth specs before committing to this. If it is an official implementation, recommended by the IETF then we should support this. Is there any spec out there specifying this? |
Thanks @eugene-borovov and @Spomky for clarifying this |
By the way, the main purpose of this PR is to fix the |
The RFC6749 spec always refers to URIs. URIs include URLs and URNs so from my POV there is no reason to exclude them. |
Thank you for this PR @eugene-borovov and I'm sorry I didn't get a chance to push this through. Since this was submitted a newer PR was proposed (#1274) which I think provides a more elegant solution as it relies on the league/uri package to handle parsing. For this reason, I'm going to close this PR but wanted to thank you for trying to resolve the issue. |
thanks for the quick reply @eugene-borovov. I added in some further tests to main, based on yours, to ensure we are able to accept custom schemes and urns. I think that the solution that has been merged does ensure all valid uris are accepted because it is using the league/uri package. If an invalid uri is passed (poorly formed rather than not pre-registered), the library will throw an exception. Thank you again for your efforts here and sorry I didn't merge it this time. |
A redirect URI without scheme causes an error.