Browse Source

Add Webex to the list of supported providers

pull/1817/head
Kévin Chalet 3 years ago
parent
commit
a5fa58e0a6
  1. 5
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs
  2. 5
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Protection.cs
  3. 20
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml

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

@ -66,6 +66,11 @@ public static partial class OpenIddictClientWebIntegrationHandlers
string.Equals(tenant, "organizations", StringComparison.OrdinalIgnoreCase) ? "https://login.microsoftonline.com/organizations/v2.0" :
context.Response[Metadata.Issuer],
// Note: the issuer returned in the Webex server configuration metadata is region-specific and
// varies dynamically depending on the location of the client making the discovery request.
// Since the returned issuer is not stable, a hardcoded value is used instead.
ProviderTypes.Webex => "https://www.webex.com/",
_ => context.Response[Metadata.Issuer]
};

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

@ -66,6 +66,11 @@ public static partial class OpenIddictClientWebIntegrationHandlers
string.Equals(tenant, "organizations", StringComparison.OrdinalIgnoreCase))
=> false,
// Note: the issuer returned in the Webex server configuration metadata is region-specific and
// varies dynamically depending on the location of the client making the discovery request.
// Since the returned issuer is not stable, issuer validation is always disabled for Webex.
ProviderTypes.Webex => false,
_ => context.TokenValidationParameters.ValidateIssuer
};

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

@ -1212,6 +1212,26 @@
</Environment>
</Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ███ ██ ▄▄▄██ ▄▄▀██ ▄▄▄█▄▀█▀▄██
██ █ █ ██ ▄▄▄██ ▄▄▀██ ▄▄▄███ ████
██▄▀▄▀▄██ ▀▀▀██ ▀▀ ██ ▀▀▀█▀▄█▄▀██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-->
<Provider Name="Webex" Id="80d58673-86d2-45c6-b553-340e23e40caf"
Documentation="https://developer.webex.com/docs/login-with-webex">
<!--
Note: the issuer returned in the Webex server configuration metadata is region-specific and
varies dynamically depending on the location of the client making the discovery request.
Since the returned issuer is not stable, the hardcoded "https://www.webex.com/" is used instead.
-->
<Environment Issuer="https://www.webex.com/" ConfigurationEndpoint="https://webexapis.com/v1/.well-known/openid-configuration" />
</Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ███ ██ ▄▄▄ ██ ▄▄▀██ ▄▄▀██ ▄▄ ██ ▄▄▀██ ▄▄▄██ ▄▄▄ ██ ▄▄▄ ██

Loading…
Cancel
Save