Browse Source

Add Calendly to the list of supported providers

pull/2129/head
Kévin Chalet 2 years ago
parent
commit
06fe531a0c
  1. 4
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Userinfo.cs
  2. 3
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs
  3. 24
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml

4
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Userinfo.cs

@ -393,6 +393,10 @@ public static partial class OpenIddictClientWebIntegrationHandlers
["accounts"] = context.Response["accounts"]
},
// Calendly returns a nested "resource" object.
ProviderTypes.Calendly => new(context.Response["resource"]?.GetNamedParameters() ??
throw new InvalidOperationException(SR.FormatID0334("resource"))),
// Disqus returns a nested "response" object.
ProviderTypes.Disqus => new(context.Response["response"]?.GetNamedParameters() ??
throw new InvalidOperationException(SR.FormatID0334("response"))),

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

@ -1310,6 +1310,9 @@ public static partial class OpenIddictClientWebIntegrationHandlers
// Bitly returns the user identifier as a custom "login" node:
ProviderTypes.Bitly => (string?) context.UserinfoResponse?["login"],
// Calendly returns the user identifier (formatted as a URI) as a custom "uri" node:
ProviderTypes.Calendly => (string?) context.UserinfoResponse?["uri"],
// DeviantArt returns the user identifier as a custom "userid" node:
ProviderTypes.DeviantArt => (string?) context.UserinfoResponse?["userid"],

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

@ -339,6 +339,30 @@
</Environment>
</Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ▄▄▀█ ▄▄▀██ █████ ▄▄▄██ ▀██ ██ ▄▄▀██ █████ ███ ██
██ ████ ▀▀ ██ █████ ▄▄▄██ █ █ ██ ██ ██ █████▄▀▀▀▄██
██ ▀▀▄█ ██ ██ ▀▀ ██ ▀▀▀██ ██▄ ██ ▀▀ ██ ▀▀ ████ ████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-->
<Provider Name="Calendly" Id="8cc37743-2939-4562-b029-05eaef4724c0"
Documentation="https://developer.calendly.com/api-docs/b3A6NTkxNDA5-get-authorization-code">
<Environment Issuer="https://calendly.com/">
<Configuration AuthorizationEndpoint="https://auth.calendly.com/oauth/authorize"
IntrospectionEndpoint="https://auth.calendly.com/oauth/introspect"
RevocationEndpoint="https://auth.calendly.com/oauth/revoke"
TokenEndpoint="https://auth.calendly.com/oauth/token"
UserinfoEndpoint="https://api.calendly.com/users/me">
<CodeChallengeMethod Value="S256" />
<GrantType Value="authorization_code" />
<GrantType Value="refresh_token" />
</Configuration>
</Environment>
</Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ▄▄▀██ █████ ▄▄▀██ ▄▄▄ ██ ▄▄▄ ██ ████▄ ▄█ ▀██ ██ █▀▄██

Loading…
Cancel
Save