diff --git a/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs b/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs
index b90d8b63..60bc76e5 100644
--- a/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs
+++ b/gen/OpenIddict.Client.WebIntegration.Generators/OpenIddictClientWebIntegrationGenerator.cs
@@ -238,40 +238,48 @@ public partial class OpenIddictClientWebIntegrationConfiguration
{{~ for environment in provider.environments ~}}
if (settings.Environment is OpenIddictClientWebIntegrationEnvironments.{{ provider.name }}.{{ environment.name }})
{
- {{~ for scope in environment.scopes ~}}
- {{~ if scope.required ~}}
- settings.Scopes.Add(""{{ scope.name }}"");
- {{~ end ~}}
-
- {{~ if scope.default ~}}
if (settings.Scopes.Count is 0)
{
+ {{~ for scope in environment.scopes ~}}
+ {{~ if scope.default && !scope.required ~}}
settings.Scopes.Add(""{{ scope.name }}"");
+ {{~ end ~}}
+ {{~ end ~}}
}
+
+ {{~ for scope in environment.scopes ~}}
+ {{~ if scope.required ~}}
+ settings.Scopes.Add(""{{ scope.name }}"");
{{~ end ~}}
{{~ end ~}}
}
{{~ end ~}}
{{~ for setting in provider.settings ~}}
- {{~ if setting.default_value ~}}
+ {{~ if setting.default_value && setting.type == 'String' ~}}
if (string.IsNullOrEmpty(settings.{{ setting.name }}))
{
settings.{{ setting.name }} = ""{{ setting.default_value }}"";
}
{{~ end ~}}
-
- {{~ for item in setting.collection_items ~}}
- {{~ if item.required ~}}
- settings.{{ setting.name }}.Add(""{{ item.value }}"");
{{~ end ~}}
- {{~ if item.default ~}}
+ {{~ for setting in provider.settings ~}}
+ {{~ if setting.collection ~}}
if (settings.{{ setting.name }}.Count is 0)
{
+ {{~ for item in setting.collection_items ~}}
+ {{~ if item.default && !item.required ~}}
settings.{{ setting.name }}.Add(""{{ item.value }}"");
+ {{~ end ~}}
+ {{~ end ~}}
}
{{~ end ~}}
+
+ {{~ for item in setting.collection_items ~}}
+ {{~ if item.required ~}}
+ settings.{{ setting.name }}.Add(""{{ item.value }}"");
+ {{~ end ~}}
{{~ end ~}}
{{~ end ~}}
@@ -482,6 +490,7 @@ public partial class OpenIddictClientWebIntegrationConfiguration
Name = (string) setting.Attribute("Name"),
Type = (string) setting.Attribute("Type"),
Required = (bool?) setting.Attribute("Required") ?? false,
+ Collection = (bool?) setting.Attribute("Collection") ?? false,
EncryptionAlgorithm = (string?) setting.Element("EncryptionAlgorithm")?.Attribute("Value"),
SigningAlgorithm = (string?) setting.Element("SigningAlgorithm")?.Attribute("Value"),
@@ -562,9 +571,9 @@ public partial class OpenIddictClientWebIntegrationSettings
///
{{~ end ~}}
{{~ if setting.collection ~}}
- public HashSet<{{ setting.type }}> {{ setting.name }} { get; } = new();
+ public HashSet<{{ setting.clr_type }}> {{ setting.name }} { get; } = new();
{{~ else ~}}
- public {{ setting.type }}? {{ setting.name }} { get; set; }
+ public {{ setting.clr_type }}? {{ setting.name }} { get; set; }
{{~ end ~}}
{{~ end ~}}
@@ -588,7 +597,7 @@ public partial class OpenIddictClientWebIntegrationSettings
Name = (string) setting.Attribute("Name"),
Collection = (bool?) setting.Attribute("Collection") ?? false,
Description = (string) setting.Attribute("Description"),
- Type = (string) setting.Attribute("Type") switch
+ ClrType = (string) setting.Attribute("Type") switch
{
"EncryptionKey" when (string) setting.Element("EncryptionAlgorithm").Attribute("Value")
is "RS256" or "RS384" or "RS512" => "RsaSecurityKey",
diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
index c187d4dd..bcc013d4 100644
--- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
+++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
@@ -85,14 +85,49 @@
+ Description="Gets the list of data objects to expand from the userinfo endpoint (by default, all known expansions are requested).">
+
+
+ Description="Gets the tweet fields that should be retrieved from the userinfo endpoint (by default, all known tweet fields are requested).">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ Description="Gets the user fields that should be retrieved from the userinfo endpoint (by default, all known user fields are requested).">
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xsd b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xsd
index 0f16703d..d465a485 100644
--- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xsd
+++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xsd
@@ -241,7 +241,7 @@
-
+
An item added by default to the collection, if applicable.