Browse Source

Add Gitee to the list of supported providers

pull/2093/head
Ge 2 years ago
committed by GitHub
parent
commit
4ae1b33c45
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 16
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs
  2. 27
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml

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

@ -1260,14 +1260,14 @@ public static partial class OpenIddictClientWebIntegrationHandlers
ProviderTypes.Atlassian => (string?) context.UserinfoResponse?["account_id"],
// These providers return the user identifier as a custom "id" node:
ProviderTypes.Basecamp or ProviderTypes.Box or ProviderTypes.Dailymotion or
ProviderTypes.Deezer or ProviderTypes.Discord or ProviderTypes.Disqus or
ProviderTypes.Facebook or ProviderTypes.GitHub or ProviderTypes.Harvest or
ProviderTypes.Kook or ProviderTypes.Kroger or ProviderTypes.Lichess or
ProviderTypes.Mastodon or ProviderTypes.Meetup or ProviderTypes.Nextcloud or
ProviderTypes.Patreon or ProviderTypes.Reddit or ProviderTypes.Smartsheet or
ProviderTypes.Spotify or ProviderTypes.SubscribeStar or ProviderTypes.Todoist or
ProviderTypes.Twitter or ProviderTypes.Zoom
ProviderTypes.Basecamp or ProviderTypes.Box or ProviderTypes.Dailymotion or
ProviderTypes.Deezer or ProviderTypes.Discord or ProviderTypes.Disqus or
ProviderTypes.Facebook or ProviderTypes.Gitee or ProviderTypes.GitHub or
ProviderTypes.Harvest or ProviderTypes.Kook or ProviderTypes.Kroger or
ProviderTypes.Lichess or ProviderTypes.Mastodon or ProviderTypes.Meetup or
ProviderTypes.Nextcloud or ProviderTypes.Patreon or ProviderTypes.Reddit or
ProviderTypes.Smartsheet or ProviderTypes.Spotify or ProviderTypes.SubscribeStar or
ProviderTypes.Todoist or ProviderTypes.Twitter or ProviderTypes.Zoom
=> (string?) context.UserinfoResponse?["id"],
// Bitbucket returns the user identifier as a custom "uuid" node:

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

@ -641,6 +641,33 @@
</Environment>
</Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ▄▄ █▄ ▄█▄▄ ▄▄██ ▄▄▄██ ▄▄▄██
██ █▀▀██ ████ ████ ▄▄▄██ ▄▄▄██
██ ▀▀▄█▀ ▀███ ████ ▀▀▀██ ▀▀▀██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-->
<Provider Name="Gitee" Id="c7b7cc2f-06a3-46d5-a32b-40c5d3be40a8"
Documentation="https://gitee.com/api/v5/oauth_doc#/">
<Environment Issuer="https://gitee.com/">
<Configuration AuthorizationEndpoint="https://gitee.com/oauth/authorize"
TokenEndpoint="https://gitee.com/oauth/token"
UserinfoEndpoint="https://gitee.com/api/v5/user">
<GrantType Value="authorization_code" />
<GrantType Value="password" />
<GrantType Value="refresh_token" />
</Configuration>
<!--
Note: Gitee requires sending the "user_info" scope to be able to use the dynamic access token info endpoint.
-->
<Scope Name="user_info" Default="true" Required="true" />
</Environment>
</Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ▄▄ █▄ ▄█▄▄ ▄▄██ ██ ██ ██ ██ ▄▄▀██

Loading…
Cancel
Save