Skip to content

Commit 1c886ff

Browse files
MikeAlhayekkevinchalet
authored andcommitted
Add Genesys to the list of supported providers
1 parent b90d888 commit 1c886ff

File tree

3 files changed

+128
-11
lines changed

3 files changed

+128
-11
lines changed

src/OpenIddict.Abstractions/OpenIddictResources.resx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,6 +2272,24 @@ Alternatively, any value respecting the '[region]-[subregion]-[identifier]' patt
22722272
'Saudi Arabia' (or 'SA'),
22732273
'United Kingdom' (or 'UK'),
22742274
'United States' (or 'US').</value>
2275+
</data>
2276+
<data name="ID2189" xml:space="preserve">
2277+
<value>The specified Genesys Cloud region is not valid. Supported values are:
2278+
'Asia Pacific (Mumbai)' (or 'ap-south-1'),
2279+
'Asia Pacific (Osaka)' (or 'ap-northeast-3'),
2280+
'Asia Pacific (Seoul)' (or 'ap-northeast-2'),
2281+
'Asia Pacific (Sydney)' (or 'ap-southeast-2'),
2282+
'Asia Pacific (Tokyo)' (or 'ap-northeast-1'),
2283+
'Canada (Central)' (or 'ca-central-1'),
2284+
'Europe (Frankfurt)' (or 'eu-central-1'),
2285+
'Europe (Ireland)' (or 'eu-west-1'),
2286+
'Europe (London)' (or 'eu-west-2'),
2287+
'Europe (Zurich)' (or 'eu-central-2'),
2288+
'Middle East (UAE)' (or 'me-central-1'),
2289+
'South America (São Paulo)' (or 'sa-east-1'),
2290+
'US East (Virginia)' (or 'us-east-1'),
2291+
'US East 2 (Ohio)' (or 'us-east-2'),
2292+
'US West (Oregon)' (or 'us-west-2').</value>
22752293
</data>
22762294
<data name="ID4000" xml:space="preserve">
22772295
<value>The '{0}' parameter shouldn't be null or empty at this point.</value>

src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,17 +1513,17 @@ ProviderTypes.ArcGisOnline or ProviderTypes.Trakt
15131513
ProviderTypes.Atlassian => (string?) context.UserInfoResponse?["account_id"],
15141514

15151515
// These providers return the user identifier as a custom "id" node:
1516-
ProviderTypes.Airtable or ProviderTypes.Basecamp or ProviderTypes.Box or
1517-
ProviderTypes.Dailymotion or ProviderTypes.Deezer or ProviderTypes.Discord or
1518-
ProviderTypes.Disqus or ProviderTypes.Facebook or ProviderTypes.Gitee or
1519-
ProviderTypes.GitHub or ProviderTypes.Harvest or ProviderTypes.Kook or
1520-
ProviderTypes.Kroger or ProviderTypes.Lichess or ProviderTypes.Linear or
1521-
ProviderTypes.Mastodon or ProviderTypes.Meetup or ProviderTypes.Miro or
1522-
ProviderTypes.Nextcloud or ProviderTypes.Patreon or ProviderTypes.Pipedrive or
1523-
ProviderTypes.Reddit or ProviderTypes.Smartsheet or ProviderTypes.Spotify or
1524-
ProviderTypes.SubscribeStar or ProviderTypes.Todoist or ProviderTypes.Twitter or
1525-
ProviderTypes.Webflow or ProviderTypes.Weibo or ProviderTypes.Yandex or
1526-
ProviderTypes.Zoom
1516+
ProviderTypes.Airtable or ProviderTypes.Basecamp or ProviderTypes.Box or
1517+
ProviderTypes.Dailymotion or ProviderTypes.Deezer or ProviderTypes.Discord or
1518+
ProviderTypes.Disqus or ProviderTypes.Facebook or ProviderTypes.Genesys or
1519+
ProviderTypes.Gitee or ProviderTypes.GitHub or ProviderTypes.Harvest or
1520+
ProviderTypes.Kook or ProviderTypes.Kroger or ProviderTypes.Lichess or
1521+
ProviderTypes.Linear or ProviderTypes.Mastodon or ProviderTypes.Meetup or
1522+
ProviderTypes.Miro or ProviderTypes.Nextcloud or ProviderTypes.Patreon or
1523+
ProviderTypes.Pipedrive or ProviderTypes.Reddit or ProviderTypes.Smartsheet or
1524+
ProviderTypes.Spotify or ProviderTypes.SubscribeStar or ProviderTypes.Todoist or
1525+
ProviderTypes.Twitter or ProviderTypes.Webflow or ProviderTypes.Weibo or
1526+
ProviderTypes.Yandex or ProviderTypes.Zoom
15271527
=> (string?) context.UserInfoResponse?["id"],
15281528

15291529
// Bitbucket returns the user identifier as a custom "uuid" node:

src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,105 @@
807807
</Environment>
808808
</Provider>
809809

810+
<!--
811+
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
812+
██ ▄▄ ██ ▄▄▄██ ▀██ ██ ▄▄▄██ ▄▄▄ ██ ███ ██ ▄▄▄ ██
813+
██ █▀▀██ ▄▄▄██ █ █ ██ ▄▄▄██▄▄▄▀▀██▄▀▀▀▄██▄▄▄▀▀██
814+
██ ▀▀▄██ ▀▀▀██ ██▄ ██ ▀▀▀██ ▀▀▀ ████ ████ ▀▀▀ ██
815+
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
816+
-->
817+
818+
<Provider Name="Genesys" DisplayName="Genesys Cloud" Id="2e34b9d0-5c1f-4e23-9ac9-b4aefde213d2"
819+
Documentation="https://developer.genesys.cloud/authorization/platform-auth/">
820+
<!--
821+
Note: while Genesys Cloud supports OAuth 2.0 Proof Key for Code Exchange, it never returns
822+
a refresh token when an authorization request was initially protected with PKCE. To avoid this
823+
major limitation, OAuth 2.0 Proof Key for Code Exchange is deliberately not used for Genesys.
824+
-->
825+
826+
<Environment Issuer="{settings.Region switch {
827+
'Asia Pacific (Mumbai)' or 'ap-south-1' => 'https://login.aps1.pure.cloud/',
828+
'Asia Pacific (Osaka)' or 'ap-northeast-3' => 'https://login.apne3.pure.cloud/',
829+
'Asia Pacific (Seoul)' or 'ap-northeast-2' => 'https://login.apne2.pure.cloud/',
830+
'Asia Pacific (Sydney)' or 'ap-southeast-2' => 'https://login.mypurecloud.com.au/',
831+
'Asia Pacific (Tokyo)' or 'ap-northeast-1' => 'https://login.mypurecloud.jp/',
832+
'Canada (Central)' or 'ca-central-1' => 'https://login.cac1.pure.cloud/',
833+
'Europe (Frankfurt)' or 'eu-central-1' => 'https://login.mypurecloud.de/',
834+
'Europe (Ireland)' or 'eu-west-1' => 'https://login.mypurecloud.ie/',
835+
'Europe (London)' or 'eu-west-2' => 'https://login.euw2.pure.cloud/',
836+
'Europe (Zurich)' or 'eu-central-2' => 'https://login.euc2.pure.cloud/',
837+
'Middle East (UAE)' or 'me-central-1' => 'https://login.mec1.pure.cloud/',
838+
'South America (São Paulo)' or 'sa-east-1' => 'https://login.sae1.pure.cloud/',
839+
'US East (Virginia)' or 'us-east-1' => 'https://login.mypurecloud.com/',
840+
'US East 2 (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/',
841+
'US West (Oregon)' or 'us-west-2' => 'https://login.usw2.pure.cloud/',
842+
843+
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2189)) }}">
844+
<Configuration AuthorizationEndpoint="{settings.Region switch {
845+
'Asia Pacific (Mumbai)' or 'ap-south-1' => 'https://login.aps1.pure.cloud/oauth/authorize',
846+
'Asia Pacific (Osaka)' or 'ap-northeast-3' => 'https://login.apne3.pure.cloud/oauth/authorize',
847+
'Asia Pacific (Seoul)' or 'ap-northeast-2' => 'https://login.apne2.pure.cloud/oauth/authorize',
848+
'Asia Pacific (Sydney)' or 'ap-southeast-2' => 'https://login.mypurecloud.com.au/oauth/authorize',
849+
'Asia Pacific (Tokyo)' or 'ap-northeast-1' => 'https://login.mypurecloud.jp/oauth/authorize',
850+
'Canada (Central)' or 'ca-central-1' => 'https://login.cac1.pure.cloud/oauth/authorize',
851+
'Europe (Frankfurt)' or 'eu-central-1' => 'https://login.mypurecloud.de/oauth/authorize',
852+
'Europe (Ireland)' or 'eu-west-1' => 'https://login.mypurecloud.ie/oauth/authorize',
853+
'Europe (London)' or 'eu-west-2' => 'https://login.euw2.pure.cloud/oauth/authorize',
854+
'Europe (Zurich)' or 'eu-central-2' => 'https://login.euc2.pure.cloud/oauth/authorize',
855+
'Middle East (UAE)' or 'me-central-1' => 'https://login.mec1.pure.cloud/oauth/authorize',
856+
'South America (São Paulo)' or 'sa-east-1' => 'https://login.sae1.pure.cloud/oauth/authorize',
857+
'US East (Virginia)' or 'us-east-1' => 'https://login.mypurecloud.com/oauth/authorize',
858+
'US East 2 (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/oauth/authorize',
859+
'US West (Oregon)' or 'us-west-2' => 'https://login.usw2.pure.cloud/oauth/authorize',
860+
861+
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2189)) }}"
862+
TokenEndpoint="{settings.Region switch {
863+
'Asia Pacific (Mumbai)' or 'ap-south-1' => 'https://login.aps1.pure.cloud/oauth/token',
864+
'Asia Pacific (Osaka)' or 'ap-northeast-3' => 'https://login.apne3.pure.cloud/oauth/token',
865+
'Asia Pacific (Seoul)' or 'ap-northeast-2' => 'https://login.apne2.pure.cloud/oauth/token',
866+
'Asia Pacific (Sydney)' or 'ap-southeast-2' => 'https://login.mypurecloud.com.au/oauth/token',
867+
'Asia Pacific (Tokyo)' or 'ap-northeast-1' => 'https://login.mypurecloud.jp/oauth/token',
868+
'Canada (Central)' or 'ca-central-1' => 'https://login.cac1.pure.cloud/oauth/token',
869+
'Europe (Frankfurt)' or 'eu-central-1' => 'https://login.mypurecloud.de/oauth/token',
870+
'Europe (Ireland)' or 'eu-west-1' => 'https://login.mypurecloud.ie/oauth/token',
871+
'Europe (London)' or 'eu-west-2' => 'https://login.euw2.pure.cloud/oauth/token',
872+
'Europe (Zurich)' or 'eu-central-2' => 'https://login.euc2.pure.cloud/oauth/token',
873+
'Middle East (UAE)' or 'me-central-1' => 'https://login.mec1.pure.cloud/oauth/token',
874+
'South America (São Paulo)' or 'sa-east-1' => 'https://login.sae1.pure.cloud/oauth/token',
875+
'US East (Virginia)' or 'us-east-1' => 'https://login.mypurecloud.com/oauth/token',
876+
'US East 2 (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/oauth/token',
877+
'US West (Oregon)' or 'us-west-2' => 'https://login.usw2.pure.cloud/oauth/token',
878+
879+
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2189)) }}"
880+
UserInfoEndpoint="{settings.Region switch {
881+
'Asia Pacific (Mumbai)' or 'ap-south-1' => 'https://api.aps1.pure.cloud/api/v2/users/me',
882+
'Asia Pacific (Osaka)' or 'ap-northeast-3' => 'https://api.apne3.pure.cloud/api/v2/users/me',
883+
'Asia Pacific (Seoul)' or 'ap-northeast-2' => 'https://api.apne2.pure.cloud/api/v2/users/me',
884+
'Asia Pacific (Sydney)' or 'ap-southeast-2' => 'https://api.mypurecloud.com.au/api/v2/users/me',
885+
'Asia Pacific (Tokyo)' or 'ap-northeast-1' => 'https://api.mypurecloud.jp/api/v2/users/me',
886+
'Canada (Central)' or 'ca-central-1' => 'https://api.cac1.pure.cloud/api/v2/users/me',
887+
'Europe (Frankfurt)' or 'eu-central-1' => 'https://api.mypurecloud.de/api/v2/users/me',
888+
'Europe (Ireland)' or 'eu-west-1' => 'https://api.mypurecloud.ie/api/v2/users/me',
889+
'Europe (London)' or 'eu-west-2' => 'https://api.euw2.pure.cloud/api/v2/users/me',
890+
'Europe (Zurich)' or 'eu-central-2' => 'https://api.euc2.pure.cloud/api/v2/users/me',
891+
'Middle East (UAE)' or 'me-central-1' => 'https://api.mec1.pure.cloud/api/v2/users/me',
892+
'South America (São Paulo)' or 'sa-east-1' => 'https://api.sae1.pure.cloud/api/v2/users/me',
893+
'US East (Virginia)' or 'us-east-1' => 'https://api.mypurecloud.com/api/v2/users/me',
894+
'US East 2 (Ohio)' or 'us-east-2' => 'https://api.use2.us-gov-pure.cloud/api/v2/users/me',
895+
'US West (Oregon)' or 'us-west-2' => 'https://api.usw2.pure.cloud/api/v2/users/me',
896+
897+
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2189)) }}">
898+
899+
<GrantType Value="authorization_code" />
900+
<GrantType Value="client_credentials" />
901+
<GrantType Value="refresh_token" />
902+
</Configuration>
903+
</Environment>
904+
905+
<Setting PropertyName="Region" ParameterName="region" Type="String" Required="true"
906+
Description="Specifies the region name (e.g., 'US East (Virginia)'). To determine the correct region for your instance, visit https://developer.genesys.cloud/platform/api/" />
907+
</Provider>
908+
810909
<!--
811910
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
812911
██ ▄▄ █▄ ▄█▄▄ ▄▄██ ▄▄▀██ ▄▄▄ ██ ▄▄▀██ ▄▄▄██

0 commit comments

Comments
 (0)