Browse Source

Add Figma to the list of supported providers

pull/2394/head
Kévin Chalet 3 months ago
parent
commit
2445813f8c
  1. 25
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs
  2. 32
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml

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

@ -1457,6 +1457,9 @@ public static partial class OpenIddictClientWebIntegrationHandlers
context.UserInfoResponse?.HasParameter("lastName") is true context.UserInfoResponse?.HasParameter("lastName") is true
=> $"{(string?) context.UserInfoResponse?["firstName"]} {(string?) context.UserInfoResponse?["lastName"]}", => $"{(string?) context.UserInfoResponse?["firstName"]} {(string?) context.UserInfoResponse?["lastName"]}",
// Figma returns the username as a custom "handle" node:
ProviderTypes.Figma => (string?) context.UserInfoResponse?["handle"],
// Huawei returns the username as a custom "display_name" in the backchannel identity token: // Huawei returns the username as a custom "display_name" in the backchannel identity token:
ProviderTypes.Huawei => context.BackchannelIdentityTokenPrincipal?.GetClaim("display_name"), ProviderTypes.Huawei => context.BackchannelIdentityTokenPrincipal?.GetClaim("display_name"),
@ -1531,17 +1534,17 @@ public static partial class OpenIddictClientWebIntegrationHandlers
ProviderTypes.Atlassian => (string?) context.UserInfoResponse?["account_id"], ProviderTypes.Atlassian => (string?) context.UserInfoResponse?["account_id"],
// These providers return the user identifier as a custom "id" node: // These providers return the user identifier as a custom "id" node:
ProviderTypes.Airtable or ProviderTypes.Basecamp or ProviderTypes.Box or ProviderTypes.Airtable or ProviderTypes.Basecamp or ProviderTypes.Box or
ProviderTypes.Dailymotion or ProviderTypes.Deezer or ProviderTypes.Discord or ProviderTypes.Dailymotion or ProviderTypes.Deezer or ProviderTypes.Discord or
ProviderTypes.Disqus or ProviderTypes.Facebook or ProviderTypes.Genesys or ProviderTypes.Disqus or ProviderTypes.Facebook or ProviderTypes.Figma or
ProviderTypes.Gitee or ProviderTypes.GitHub or ProviderTypes.Harvest or ProviderTypes.Genesys or ProviderTypes.Gitee or ProviderTypes.GitHub or
ProviderTypes.Kook or ProviderTypes.Kroger or ProviderTypes.Lichess or ProviderTypes.Harvest or ProviderTypes.Kook or ProviderTypes.Kroger or
ProviderTypes.Linear or ProviderTypes.Mastodon or ProviderTypes.Meetup or ProviderTypes.Lichess or ProviderTypes.Linear or ProviderTypes.Mastodon or
ProviderTypes.Miro or ProviderTypes.Nextcloud or ProviderTypes.Patreon or ProviderTypes.Meetup or ProviderTypes.Miro or ProviderTypes.Nextcloud or
ProviderTypes.Pipedrive or ProviderTypes.Reddit or ProviderTypes.Smartsheet or ProviderTypes.Patreon or ProviderTypes.Pipedrive or ProviderTypes.Reddit or
ProviderTypes.Spotify or ProviderTypes.SubscribeStar or ProviderTypes.Todoist or ProviderTypes.Smartsheet or ProviderTypes.Spotify or ProviderTypes.SubscribeStar or
ProviderTypes.Twitter or ProviderTypes.Webflow or ProviderTypes.Weibo or ProviderTypes.Todoist or ProviderTypes.Twitter or ProviderTypes.Webflow or
ProviderTypes.Yandex or ProviderTypes.Zoom ProviderTypes.Weibo or ProviderTypes.Yandex or ProviderTypes.Zoom
=> (string?) context.UserInfoResponse?["id"], => (string?) context.UserInfoResponse?["id"],
// Bitbucket returns the user identifier as a custom "uuid" node: // Bitbucket returns the user identifier as a custom "uuid" node:

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

@ -851,6 +851,36 @@
ConfigurationEndpoint="https://api.faceit.com/auth/v1/openid_configuration" /> ConfigurationEndpoint="https://api.faceit.com/auth/v1/openid_configuration" />
</Provider> </Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ▄▄▄█▄ ▄██ ▄▄ ██ ▄▀▄ █ ▄▄▀██
██ ▄▄███ ███ █▀▀██ █ █ █ ▀▀ ██
██ ████▀ ▀██ ▀▀▄██ ███ █ ██ ██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-->
<Provider Name="Figma" Id="2bb1d445-2de1-4c9e-ad47-f289f32c7edd"
Documentation="https://developers.figma.com/docs/rest-api/authentication/">
<Environment Issuer="https://www.figma.com/">
<Configuration AuthorizationEndpoint="https://www.figma.com/oauth"
TokenEndpoint="https://api.figma.com/v1/oauth/token"
UserInfoEndpoint="https://api.figma.com/v1/me">
<CodeChallengeMethod Value="S256" />
<GrantType Value="authorization_code" />
<GrantType Value="refresh_token" />
<TokenEndpointAuthMethod Value="client_secret_basic" />
</Configuration>
<!--
Note: Figma requires sending the "current_user:read" scope to be able to use the userinfo endpoint.
-->
<Scope Name="current_user:read" Default="true" Required="true" />
</Environment>
</Provider>
<!-- <!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ▄▄▄█▄ ▄█▄▄ ▄▄██ ▄▄▀█▄ ▄█▄▄ ▄▄██ ██ ▄▄▄█▄ ▄█▄▄ ▄▄██ ▄▄▀█▄ ▄█▄▄ ▄▄██
@ -1121,11 +1151,13 @@
</Environment> </Environment>
</Provider> </Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ██ █ ▄▄▄█ ███ █ ▄▄▀█ ▄▄▄ █▄▀█▀▄█ ▄▄▀█ ██ █ ▄▄▀█▄▄ ▄▄██ ██ ██ █ ▄▄▄█ ███ █ ▄▄▀█ ▄▄▄ █▄▀█▀▄█ ▄▄▀█ ██ █ ▄▄▀█▄▄ ▄▄██
██ ▄▄ █ ▄▄▄█▄▀▀▀▄█ ▄▄▀█ ███ ███ ███ ████ ▄▄ █ ▀▀ ███ ████ ██ ▄▄ █ ▄▄▄█▄▀▀▀▄█ ▄▄▀█ ███ ███ ███ ████ ▄▄ █ ▀▀ ███ ████
██ ██ █ ▀▀▀███ ███ ▀▀ █ ▀▀▀ █▀▄█▄▀█ ▀▀▄█ ██ █ ██ ███ ████ ██ ██ █ ▀▀▀███ ███ ▀▀ █ ▀▀▀ █▀▄█▄▀█ ▀▀▄█ ██ █ ██ ███ ████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-->
<Provider Name="HeyBoxChat" Id="b1b84538-0487-4106-bf53-4d0390523686" <Provider Name="HeyBoxChat" Id="b1b84538-0487-4106-bf53-4d0390523686"
Documentation="https://s.apifox.cn/43256fe4-9a8c-4f22-949a-74a3f8b431f5/7145802m0"> Documentation="https://s.apifox.cn/43256fe4-9a8c-4f22-949a-74a3f8b431f5/7145802m0">

Loading…
Cancel
Save