diff --git a/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs b/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs
index 6ca0a99e..d80d4739 100644
--- a/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs
+++ b/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs
@@ -808,7 +808,7 @@ public sealed partial class OpenIddictClientWebIntegrationBuilder
return template.Render(new
{
Providers = document.Root.Elements("Provider")
- .Select(provider => new
+ .Select(static provider => new
{
Name = (string) provider.Attribute("Name"),
DisplayName = (string?) provider.Attribute("DisplayName") ?? (string) provider.Attribute("Name"),
@@ -816,13 +816,13 @@ public sealed partial class OpenIddictClientWebIntegrationBuilder
Obsolete = (bool?) provider.Attribute("Obsolete") ?? false,
- Environments = provider.Elements("Environment").Select(environment => new
+ Environments = provider.Elements("Environment").Select(static environment => new
{
Name = (string?) environment.Attribute("Name") ?? "Production"
})
.ToList(),
- Settings = provider.Elements("Setting").Select(setting => new
+ Settings = provider.Elements("Setting").Select(static setting => new
{
PropertyName = (string) setting.Attribute("PropertyName"),
ParameterName = (string) setting.Attribute("ParameterName"),
@@ -889,6 +889,15 @@ public static partial class OpenIddictClientWebIntegrationConstants
public const string {{ property.name }} = ""{{ property.dictionary_key }}"";
{{~ end ~}}
}
+
+ {{~ for group in provider.constants ~}}
+ public static class {{ group.key }}
+ {
+ {{~ for constant in group ~}}
+ public const string {{ constant.name }} = ""{{ constant.value }}"";
+ {{~ end ~}}
+ }
+ {{~ end ~}}
}
{{~ end ~}}
@@ -910,23 +919,33 @@ public static partial class OpenIddictClientWebIntegrationConstants
return template.Render(new
{
Providers = document.Root.Elements("Provider")
- .Select(provider => new
+ .Select(static provider => new
{
Name = (string) provider.Attribute("Name"),
Id = (string) provider.Attribute("Id"),
- Environments = provider.Elements("Environment").Select(environment => new
+ Environments = provider.Elements("Environment").Select(static environment => new
{
Name = (string?) environment.Attribute("Name") ?? "Production"
})
.ToList(),
- Properties = provider.Elements("Property").Select(property => new
+ Properties = provider.Elements("Property").Select(static property => new
{
Name = (string) property.Attribute("Name"),
DictionaryKey = (string) property.Attribute("DictionaryKey")
})
.ToList(),
+
+ Constants = provider.Elements("Constant")
+ .Select(static constant => new
+ {
+ Class = (string) constant.Attribute("Class"),
+ Name = (string) constant.Attribute("Name"),
+ Value = (string) constant.Attribute("Value")
+ })
+ .GroupBy(static constant => constant.Class)
+ .ToList(),
})
.ToList()
});
@@ -1292,12 +1311,12 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
return template.Render(new
{
Providers = document.Root.Elements("Provider")
- .Select(provider => new
+ .Select(static provider => new
{
Name = (string) provider.Attribute("Name"),
DisplayName = (string?) provider.Attribute("DisplayName") ?? (string) provider.Attribute("Name"),
- Environments = provider.Elements("Environment").Select(environment => new
+ Environments = provider.Elements("Environment").Select(static environment => new
{
Name = (string?) environment.Attribute("Name") ?? "Production",
@@ -1317,14 +1336,14 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
CodeChallengeMethodsSupported = configuration.Elements("CodeChallengeMethod").ToList() switch
{
- { Count: > 0 } methods => methods.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } methods => methods.Select(static type => (string?) type.Attribute("Value")).ToList(),
_ => []
},
GrantTypesSupported = configuration.Elements("GrantType").ToList() switch
{
- { Count: > 0 } types => types.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } types => types.Select(static type => (string?) type.Attribute("Value")).ToList(),
// If no explicit grant type was set, assume the provider only supports the code flow.
_ => [GrantTypes.AuthorizationCode]
@@ -1332,7 +1351,7 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
ResponseModesSupported = configuration.Elements("ResponseMode").ToList() switch
{
- { Count: > 0 } modes => modes.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } modes => modes.Select(static type => (string?) type.Attribute("Value")).ToList(),
// If no explicit response mode was set, assume the provider only supports the query response mode.
_ => [ResponseModes.Query]
@@ -1340,7 +1359,7 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
ResponseTypesSupported = configuration.Elements("ResponseType").ToList() switch
{
- { Count: > 0 } types => types.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } types => types.Select(static type => (string?) type.Attribute("Value")).ToList(),
// If no explicit response type was set, assume the provider only supports the code flow.
_ => [ResponseTypes.Code]
@@ -1348,14 +1367,14 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
ScopesSupported = configuration.Elements("Scope").ToList() switch
{
- { Count: > 0 } types => types.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } types => types.Select(static type => (string?) type.Attribute("Value")).ToList(),
_ => []
},
DeviceAuthorizationEndpointAuthMethodsSupported = configuration.Elements("DeviceAuthorizationEndpointAuthMethod").ToList() switch
{
- { Count: > 0 } methods => methods.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } methods => methods.Select(static type => (string?) type.Attribute("Value")).ToList(),
// If no explicit client authentication method was set, assume the provider only supports
// flowing the client credentials as part of the device authorization request payload.
@@ -1364,7 +1383,7 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
IntrospectionEndpointAuthMethodsSupported = configuration.Elements("IntrospectionEndpointAuthMethod").ToList() switch
{
- { Count: > 0 } methods => methods.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } methods => methods.Select(static type => (string?) type.Attribute("Value")).ToList(),
// If no explicit client authentication method was set, assume the provider only
// supports flowing the client credentials as part of the introspection request payload.
@@ -1373,7 +1392,7 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
RevocationEndpointAuthMethodsSupported = configuration.Elements("RevocationEndpointAuthMethod").ToList() switch
{
- { Count: > 0 } methods => methods.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } methods => methods.Select(static type => (string?) type.Attribute("Value")).ToList(),
// If no explicit client authentication method was set, assume the provider only
// supports flowing the client credentials as part of the revocation request payload.
@@ -1382,7 +1401,7 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
TokenEndpointAuthMethodsSupported = configuration.Elements("TokenEndpointAuthMethod").ToList() switch
{
- { Count: > 0 } methods => methods.Select(type => (string?) type.Attribute("Value")).ToList(),
+ { Count: > 0 } methods => methods.Select(static type => (string?) type.Attribute("Value")).ToList(),
// If no explicit client authentication method was set, assume the provider only
// supports flowing the client credentials as part of the token request payload.
@@ -1393,7 +1412,7 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
_ => null
},
- Scopes = environment.Elements("Scope").Select(setting => new
+ Scopes = environment.Elements("Scope").Select(static setting => new
{
Name = (string) setting.Attribute("Name"),
Default = (bool?) setting.Attribute("Default") ?? false,
@@ -1402,7 +1421,7 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
})
.ToList(),
- Settings = provider.Elements("Setting").Select(setting => new
+ Settings = provider.Elements("Setting").Select(static setting => new
{
PropertyName = (string) setting.Attribute("PropertyName"),
@@ -1415,7 +1434,7 @@ public sealed partial class OpenIddictClientWebIntegrationConfiguration
DefaultValue = (string?) setting.Attribute("DefaultValue"),
- Items = setting.Elements("Item").Select(item => new
+ Items = setting.Elements("Item").Select(static item => new
{
Value = (string) item.Attribute("Value"),
Default = (bool?) item.Attribute("Default") ?? false,
@@ -1459,7 +1478,7 @@ public static partial class OpenIddictClientWebIntegrationHelpers
return template.Render(new
{
Providers = document.Root.Elements("Provider")
- .Select(provider => new
+ .Select(static provider => new
{
Name = (string) provider.Attribute("Name"),
DisplayName = (string?) provider.Attribute("DisplayName") ?? (string) provider.Attribute("Name")
@@ -1511,12 +1530,12 @@ public sealed partial class OpenIddictClientWebIntegrationSettings
return template.Render(new
{
Providers = document.Root.Elements("Provider")
- .Select(provider => new
+ .Select(static provider => new
{
Name = (string) provider.Attribute("Name"),
DisplayName = (string?) provider.Attribute("DisplayName") ?? (string) provider.Attribute("Name"),
- Settings = provider.Elements("Setting").Select(setting => new
+ Settings = provider.Elements("Setting").Select(static setting => new
{
PropertyName = (string) setting.Attribute("PropertyName"),
diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs
index 524ca52e..a6fb43cd 100644
--- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs
+++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs
@@ -1692,8 +1692,8 @@ public static partial class OpenIddictClientWebIntegrationHandlers
ProviderTypes.StripeConnect when context.Properties.TryGetValue(
StripeConnect.Properties.AccountType, out string? type) => type switch
{
- "Express" => new Uri("https://connect.stripe.com/express/oauth/authorize", UriKind.Absolute),
- "Standard" => new Uri("https://connect.stripe.com/oauth/authorize", UriKind.Absolute),
+ "express" => new Uri("https://connect.stripe.com/express/oauth/authorize", UriKind.Absolute),
+ "standard" => new Uri("https://connect.stripe.com/oauth/authorize", UriKind.Absolute),
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2190))
},
diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
index 601cdb36..738946e9 100644
--- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
+++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
@@ -99,6 +99,9 @@
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2184)) }}" />
+
+
+
@@ -312,6 +315,11 @@
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2185)) }}" />
+
+
+
+
+
@@ -474,6 +482,44 @@
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2186)) }}" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -837,7 +883,7 @@
'Middle East (UAE)' or 'me-central-1' => 'https://login.mec1.pure.cloud/',
'South America (São Paulo)' or 'sa-east-1' => 'https://login.sae1.pure.cloud/',
'US East (Virginia)' or 'us-east-1' => 'https://login.mypurecloud.com/',
- 'US East 2 (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/',
+ 'US East (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/',
'US West (Oregon)' or 'us-west-2' => 'https://login.usw2.pure.cloud/',
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2189)) }}">
@@ -855,7 +901,7 @@
'Middle East (UAE)' or 'me-central-1' => 'https://login.mec1.pure.cloud/oauth/authorize',
'South America (São Paulo)' or 'sa-east-1' => 'https://login.sae1.pure.cloud/oauth/authorize',
'US East (Virginia)' or 'us-east-1' => 'https://login.mypurecloud.com/oauth/authorize',
- 'US East 2 (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/oauth/authorize',
+ 'US East (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/oauth/authorize',
'US West (Oregon)' or 'us-west-2' => 'https://login.usw2.pure.cloud/oauth/authorize',
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2189)) }}"
@@ -873,7 +919,7 @@
'Middle East (UAE)' or 'me-central-1' => 'https://login.mec1.pure.cloud/oauth/token',
'South America (São Paulo)' or 'sa-east-1' => 'https://login.sae1.pure.cloud/oauth/token',
'US East (Virginia)' or 'us-east-1' => 'https://login.mypurecloud.com/oauth/token',
- 'US East 2 (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/oauth/token',
+ 'US East (Ohio)' or 'us-east-2' => 'https://login.use2.us-gov-pure.cloud/oauth/token',
'US West (Oregon)' or 'us-west-2' => 'https://login.usw2.pure.cloud/oauth/token',
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2189)) }}"
@@ -891,7 +937,7 @@
'Middle East (UAE)' or 'me-central-1' => 'https://api.mec1.pure.cloud/api/v2/users/me',
'South America (São Paulo)' or 'sa-east-1' => 'https://api.sae1.pure.cloud/api/v2/users/me',
'US East (Virginia)' or 'us-east-1' => 'https://api.mypurecloud.com/api/v2/users/me',
- 'US East 2 (Ohio)' or 'us-east-2' => 'https://api.use2.us-gov-pure.cloud/api/v2/users/me',
+ 'US East (Ohio)' or 'us-east-2' => 'https://api.use2.us-gov-pure.cloud/api/v2/users/me',
'US West (Oregon)' or 'us-west-2' => 'https://api.usw2.pure.cloud/api/v2/users/me',
_ => throw new InvalidOperationException(SR.GetResourceString(SR.ID2189)) }}">
@@ -902,6 +948,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1229,6 +1296,9 @@
+
+
+
@@ -1835,6 +1905,9 @@
+
+
+
@@ -1983,10 +2056,13 @@
+
+
+
+ Description="The type of the Stripe account (by default, 'standard', but can also be set to 'express'). Note: the account type can also be set dynamically via the authentication properties" />