@ -102,7 +102,7 @@ public static partial class OpenIddictClientHandlers
{
null = > null ,
// If the client URI doesn't contain any path/ query/fragment, allow both http://www.fabrikam.com
// If the client URI doesn't contain any query/fragment, allow both http://www.fabrikam.com
// and http://www.fabrikam.com/ (the recommended URI representation) to be considered valid.
// See https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.3 for more information.
{ AbsolutePath : "/" , Query . Length : 0 , Fragment . Length : 0 } uri = > new [ ]
@ -111,6 +111,16 @@ public static partial class OpenIddictClientHandlers
uri . AbsoluteUri [ . . ^ 1 ]
} ,
// When properly normalized, Uri.AbsolutePath should never be empty and should at least
// contain a leading slash. While dangerous, System.Uri now offers a way to create a URI
// instance without applying the default canonicalization logic. To support such URIs,
// a special case is added here to add back the missing trailing slash when necessary.
{ AbsolutePath . Length : 0 , Query . Length : 0 , Fragment . Length : 0 } uri = > new [ ]
{
uri . AbsoluteUri ,
uri . AbsoluteUri + "/"
} ,
Uri uri = > new [ ] { uri . AbsoluteUri }
} ;
@ -130,7 +140,7 @@ public static partial class OpenIddictClientHandlers
{
null = > null ,
// If the issuer URI doesn't contain any path/ query/fragment, allow both http://www.fabrikam.com
// If the issuer URI doesn't contain any query/fragment, allow both http://www.fabrikam.com
// and http://www.fabrikam.com/ (the recommended URI representation) to be considered valid.
// See https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.3 for more information.
{ AbsolutePath : "/" , Query . Length : 0 , Fragment . Length : 0 } uri = > new [ ]
@ -139,6 +149,16 @@ public static partial class OpenIddictClientHandlers
uri . AbsoluteUri [ . . ^ 1 ]
} ,
// When properly normalized, Uri.AbsolutePath should never be empty and should at least
// contain a leading slash. While dangerous, System.Uri now offers a way to create a URI
// instance without applying the default canonicalization logic. To support such URIs,
// a special case is added here to add back the missing trailing slash when necessary.
{ AbsolutePath . Length : 0 , Query . Length : 0 , Fragment . Length : 0 } uri = > new [ ]
{
uri . AbsoluteUri ,
uri . AbsoluteUri + "/"
} ,
Uri uri = > new [ ] { uri . AbsoluteUri }
} ;