Browse Source

Replace references to Azure Active Directory by Microsoft Entra ID

pull/2236/head 4.6.0
Kévin Chalet 3 years ago
parent
commit
dcde046420
  1. 2
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs
  2. 2
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Protection.cs
  3. 6
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs
  4. 4
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml

2
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs

@ -58,7 +58,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers
// such responses as the issuer wouldn't match the expected value. To work around that, the // such responses as the issuer wouldn't match the expected value. To work around that, the
// issuer is replaced by this handler to always use a static value (e.g "common" or "consumers"). // issuer is replaced by this handler to always use a static value (e.g "common" or "consumers").
// //
// For more information about the special tenants supported by Microsoft Account/Azure AD, see // For more information about the special tenants supported by Microsoft Account/Entra ID, see
// https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#find-your-apps-openid-configuration-document-uri. // https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#find-your-apps-openid-configuration-document-uri.
ProviderTypes.Microsoft when context.Registration.GetMicrosoftSettings() is { Tenant: string tenant } => ProviderTypes.Microsoft when context.Registration.GetMicrosoftSettings() is { Tenant: string tenant } =>
string.Equals(tenant, "common", StringComparison.OrdinalIgnoreCase) ? "https://login.microsoftonline.com/common/v2.0" : string.Equals(tenant, "common", StringComparison.OrdinalIgnoreCase) ? "https://login.microsoftonline.com/common/v2.0" :

2
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Protection.cs

@ -57,7 +57,7 @@ public static partial class OpenIddictClientWebIntegrationHandlers
// that is associated with the client application. Since the tenant cannot be // that is associated with the client application. Since the tenant cannot be
// inferred when targeting these special tenants, issuer validation is disabled. // inferred when targeting these special tenants, issuer validation is disabled.
// //
// For more information about the special tenants supported by Microsoft Account/Azure AD, see // For more information about the special tenants supported by Microsoft Account/Entra ID, see
// https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#find-your-apps-openid-configuration-document-uri. // https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#find-your-apps-openid-configuration-document-uri.
ProviderTypes.Microsoft when ProviderTypes.Microsoft when
context.Registration.GetMicrosoftSettings() is { Tenant: string tenant } && context.Registration.GetMicrosoftSettings() is { Tenant: string tenant } &&

6
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs

@ -677,9 +677,9 @@ public static partial class OpenIddictClientWebIntegrationHandlers
context.SendUserinfoRequest = context.Registration.ProviderType switch context.SendUserinfoRequest = context.Registration.ProviderType switch
{ {
// Note: the frontchannel or backchannel access tokens returned by Azure AD when a // Note: the frontchannel or backchannel access tokens returned by Microsoft Entra ID
// Xbox scope is requested cannot be used with the userinfo endpoint as they use a // when a Xbox scope is requested cannot be used with the userinfo endpoint as they use
// legacy format that is not supported by the Azure AD userinfo implementation. // a legacy format that is not supported by the Microsoft Entra userinfo implementation.
// //
// To work around this limitation, userinfo retrieval is disabled when a Xbox scope is requested. // To work around this limitation, userinfo retrieval is disabled when a Xbox scope is requested.
ProviderTypes.Microsoft => context.GrantType switch ProviderTypes.Microsoft => context.GrantType switch

4
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml

@ -601,7 +601,7 @@
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
--> -->
<Provider Name="Microsoft" DisplayName="Microsoft Account/Azure Active Directory" Id="b533a06a-3fd6-4754-aeca-025d4e3666ad" <Provider Name="Microsoft" DisplayName="Microsoft Account/Entra ID" Id="b533a06a-3fd6-4754-aeca-025d4e3666ad"
Documentation="https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc"> Documentation="https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc">
<!-- <!--
Note: Microsoft is a multitenant provider that relies on virtual paths to identify instances. Note: Microsoft is a multitenant provider that relies on virtual paths to identify instances.
@ -613,7 +613,7 @@
<Environment Issuer="https://login.microsoftonline.com/{settings.Tenant}/v2.0" /> <Environment Issuer="https://login.microsoftonline.com/{settings.Tenant}/v2.0" />
<Setting PropertyName="Tenant" ParameterName="tenant" Type="String" Required="false" DefaultValue="common" <Setting PropertyName="Tenant" ParameterName="tenant" Type="String" Required="false" DefaultValue="common"
Description="The tenant used to identify the Azure AD instance (by default, the common tenant is used)" /> Description="The tenant used to identify the Microsoft Entra instance (by default, the common tenant is used)" />
</Provider> </Provider>
<!-- <!--

Loading…
Cancel
Save