|
|
@ -108,8 +108,9 @@ public static partial class OpenIddictClientWebIntegrationHandlers |
|
|
// types is amended to include the known supported types for the providers that require it.
|
|
|
// types is amended to include the known supported types for the providers that require it.
|
|
|
|
|
|
|
|
|
if (context.Registration.ProviderType is |
|
|
if (context.Registration.ProviderType is |
|
|
ProviderTypes.Apple or ProviderTypes.FaceIt or |
|
|
ProviderTypes.AlibabaCloud or ProviderTypes.Apple or |
|
|
ProviderTypes.LinkedIn or ProviderTypes.QuickBooksOnline) |
|
|
ProviderTypes.FaceIt or ProviderTypes.LinkedIn or |
|
|
|
|
|
ProviderTypes.QuickBooksOnline) |
|
|
{ |
|
|
{ |
|
|
context.Configuration.GrantTypesSupported.Add(GrantTypes.AuthorizationCode); |
|
|
context.Configuration.GrantTypesSupported.Add(GrantTypes.AuthorizationCode); |
|
|
context.Configuration.GrantTypesSupported.Add(GrantTypes.RefreshToken); |
|
|
context.Configuration.GrantTypesSupported.Add(GrantTypes.RefreshToken); |
|
|
@ -250,7 +251,8 @@ public static partial class OpenIddictClientWebIntegrationHandlers |
|
|
// While it is a recommended node, these providers don't include "scopes_supported" in their
|
|
|
// While it is a recommended node, these providers don't include "scopes_supported" in their
|
|
|
// configuration and thus are treated as OAuth 2.0-only providers by the OpenIddict client.
|
|
|
// configuration and thus are treated as OAuth 2.0-only providers by the OpenIddict client.
|
|
|
// To avoid that, the "openid" scope is manually added to indicate OpenID Connect is supported.
|
|
|
// To avoid that, the "openid" scope is manually added to indicate OpenID Connect is supported.
|
|
|
else if (context.Registration.ProviderType is ProviderTypes.EpicGames or ProviderTypes.Xero or ProviderTypes.EveOnline) |
|
|
else if (context.Registration.ProviderType is |
|
|
|
|
|
ProviderTypes.EpicGames or ProviderTypes.EveOnline or ProviderTypes.Xero) |
|
|
{ |
|
|
{ |
|
|
context.Configuration.ScopesSupported.Add(Scopes.OpenId); |
|
|
context.Configuration.ScopesSupported.Add(Scopes.OpenId); |
|
|
} |
|
|
} |
|
|
@ -283,6 +285,20 @@ public static partial class OpenIddictClientWebIntegrationHandlers |
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Alibaba Cloud doesn't document whether sending client credentials using basic authentication
|
|
|
|
|
|
// is supported and doesn't return a "token_endpoint_auth_methods_supported" nor a
|
|
|
|
|
|
// "revocation_endpoint_auth_methods_supported" node containing alternative authentication
|
|
|
|
|
|
// methods, making basic authentication the default. While both token and revocation requests
|
|
|
|
|
|
// currently work, "client_secret_post" is manually added here to avoid potential issues.
|
|
|
|
|
|
if (context.Registration.ProviderType is ProviderTypes.AlibabaCloud) |
|
|
|
|
|
{ |
|
|
|
|
|
context.Configuration.TokenEndpointAuthMethodsSupported.Add( |
|
|
|
|
|
ClientAuthenticationMethods.ClientSecretPost); |
|
|
|
|
|
|
|
|
|
|
|
context.Configuration.RevocationEndpointAuthMethodsSupported.Add( |
|
|
|
|
|
ClientAuthenticationMethods.ClientSecretPost); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Apple implements a non-standard client authentication method for its endpoints that
|
|
|
// Apple implements a non-standard client authentication method for its endpoints that
|
|
|
// is inspired by the standard private_key_jwt method but doesn't use the standard
|
|
|
// is inspired by the standard private_key_jwt method but doesn't use the standard
|
|
|
// client_assertion/client_assertion_type parameters. Instead, the client assertion
|
|
|
// client_assertion/client_assertion_type parameters. Instead, the client assertion
|
|
|
@ -290,7 +306,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers |
|
|
// is the same as private_key_jwt, the configuration is amended to assume Apple supports
|
|
|
// is the same as private_key_jwt, the configuration is amended to assume Apple supports
|
|
|
// private_key_jwt and an event handler is responsible for populating the client_secret
|
|
|
// private_key_jwt and an event handler is responsible for populating the client_secret
|
|
|
// parameter using the client assertion once it has been generated by OpenIddict.
|
|
|
// parameter using the client assertion once it has been generated by OpenIddict.
|
|
|
if (context.Registration.ProviderType is ProviderTypes.Apple) |
|
|
else if (context.Registration.ProviderType is ProviderTypes.Apple) |
|
|
{ |
|
|
{ |
|
|
context.Configuration.RevocationEndpointAuthMethodsSupported.Add( |
|
|
context.Configuration.RevocationEndpointAuthMethodsSupported.Add( |
|
|
ClientAuthenticationMethods.PrivateKeyJwt); |
|
|
ClientAuthenticationMethods.PrivateKeyJwt); |
|
|
|