Browse Source

Add Vimeo to the list of supported providers

pull/1710/head
Kévin Chalet 3 years ago
parent
commit
6633f52e3e
  1. 11
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Userinfo.cs
  2. 16
      src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml

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

@ -165,11 +165,12 @@ public static partial class OpenIddictClientWebIntegrationHandlers
response.Content.Headers.ContentType = context.Registration.ProviderName switch
{
// Mixcloud returns JSON-formatted contents declared as "text/javascript".
Providers.Mixcloud => new MediaTypeHeaderValue(MediaTypes.Json)
{
CharSet = Charsets.Utf8
},
Providers.Mixcloud or // Mixcloud returns JSON-formatted contents declared as "text/javascript".
Providers.Vimeo // Vimeo returns JSON-formatted contents declared as "application/vnd.vimeo.user+json".
=> new MediaTypeHeaderValue(MediaTypes.Json)
{
CharSet = Charsets.Utf8
},
_ => response.Content.Headers.ContentType
};

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

@ -497,6 +497,22 @@
</Setting>
</Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ███ █▄ ▄██ ▄▀▄ ██ ▄▄▄██ ▄▄▄ ██
███ █ ███ ███ █ █ ██ ▄▄▄██ ███ ██
███▄▀▄██▀ ▀██ ███ ██ ▀▀▀██ ▀▀▀ ██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-->
<Provider Name="Vimeo" Documentation="https://developer.vimeo.com/api/authentication">
<Environment Issuer="https://api.vimeo.com/">
<Configuration AuthorizationEndpoint="https://api.vimeo.com/oauth/authorize"
TokenEndpoint="https://api.vimeo.com/oauth/access_token"
UserinfoEndpoint="https://api.vimeo.com/me" />
</Environment>
</Provider>
<!--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ███ ██ ▄▄▄ ██ ▄▄▀██ ▄▄▀██ ▄▄ ██ ▄▄▀██ ▄▄▄██ ▄▄▄ ██ ▄▄▄ ██

Loading…
Cancel
Save