diff --git a/src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj b/src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj
index 904129db..5b056321 100644
--- a/src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj
+++ b/src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj
@@ -31,8 +31,7 @@
-
+
diff --git a/src/OpenIddict.Abstractions/Resources/OpenIddictResources.resx b/src/OpenIddict.Abstractions/OpenIddictResources.resx
similarity index 100%
rename from src/OpenIddict.Abstractions/Resources/OpenIddictResources.resx
rename to src/OpenIddict.Abstractions/OpenIddictResources.resx
diff --git a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs
index cec5c73a..8735139b 100644
--- a/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs
+++ b/src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs
@@ -104,7 +104,7 @@ namespace OpenIddict.Server.AspNetCore
///
/// Gets or sets the caching policy used by the authorization endpoint.
///
- public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions
+ public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new()
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30)
@@ -113,7 +113,7 @@ namespace OpenIddict.Server.AspNetCore
///
/// Gets or sets the caching policy used by the logout endpoint.
///
- public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions
+ public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new()
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30)
diff --git a/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs b/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs
index 1331432f..135ddc1b 100644
--- a/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs
+++ b/src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs
@@ -101,7 +101,7 @@ namespace OpenIddict.Server.Owin
///
/// Gets or sets the caching policy used by the authorization endpoint.
///
- public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions
+ public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new()
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30)
@@ -110,7 +110,7 @@ namespace OpenIddict.Server.Owin
///
/// Gets or sets the caching policy used by the logout endpoint.
///
- public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions
+ public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new()
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30)
diff --git a/src/OpenIddict.Server/OpenIddictServerOptions.cs b/src/OpenIddict.Server/OpenIddictServerOptions.cs
index baf96460..7a83da9f 100644
--- a/src/OpenIddict.Server/OpenIddictServerOptions.cs
+++ b/src/OpenIddict.Server/OpenIddictServerOptions.cs
@@ -43,7 +43,7 @@ namespace OpenIddict.Server
/// - X.509 keys whose backing certificate is not yet valid are never preferred.
///
///
- public List EncryptionCredentials { get; } = new List();
+ public List EncryptionCredentials { get; } = new();
///
/// Gets the list of signing credentials used by the OpenIddict server services.
@@ -61,17 +61,17 @@ namespace OpenIddict.Server
/// - X.509 keys whose backing certificate is not yet valid are never preferred.
///
///
- public List SigningCredentials { get; } = new List();
+ public List SigningCredentials { get; } = new();
///
/// Gets the absolute and relative URIs associated to the authorization endpoint.
///
- public List AuthorizationEndpointUris { get; } = new List();
+ public List AuthorizationEndpointUris { get; } = new();
///
/// Gets the absolute and relative URIs associated to the configuration endpoint.
///
- public List ConfigurationEndpointUris { get; } = new List
+ public List ConfigurationEndpointUris { get; } = new()
{
new Uri("/.well-known/openid-configuration", UriKind.Relative),
new Uri("/.well-known/oauth-authorization-server", UriKind.Relative)
@@ -88,42 +88,42 @@ namespace OpenIddict.Server
///
/// Gets the absolute and relative URIs associated to the device endpoint.
///
- public List DeviceEndpointUris { get; } = new List();
+ public List DeviceEndpointUris { get; } = new();
///
/// Gets the absolute and relative URIs associated to the introspection endpoint.
///
- public List IntrospectionEndpointUris { get; } = new List();
+ public List IntrospectionEndpointUris { get; } = new();
///
/// Gets the absolute and relative URIs associated to the logout endpoint.
///
- public List LogoutEndpointUris { get; } = new List();
+ public List LogoutEndpointUris { get; } = new();
///
/// Gets the absolute and relative URIs associated to the revocation endpoint.
///
- public List RevocationEndpointUris { get; } = new List();
+ public List RevocationEndpointUris { get; } = new();
///
/// Gets the absolute and relative URIs associated to the token endpoint.
///
- public List TokenEndpointUris { get; } = new List();
+ public List TokenEndpointUris { get; } = new();
///
/// Gets the absolute and relative URIs associated to the userinfo endpoint.
///
- public List UserinfoEndpointUris { get; } = new List();
+ public List UserinfoEndpointUris { get; } = new();
///
/// Gets the absolute and relative URIs associated to the verification endpoint.
///
- public List VerificationEndpointUris { get; } = new List();
+ public List VerificationEndpointUris { get; } = new();
///
/// Gets or sets the JWT handler used to protect and unprotect tokens.
///
- public JsonWebTokenHandler JsonWebTokenHandler { get; set; } = new JsonWebTokenHandler
+ public JsonWebTokenHandler JsonWebTokenHandler { get; set; } = new()
{
SetDefaultTimesOnTokenCreation = false
};
@@ -131,7 +131,7 @@ namespace OpenIddict.Server
///
/// Gets the token validation parameters used by the OpenIddict server services.
///
- public TokenValidationParameters TokenValidationParameters { get; } = new TokenValidationParameters
+ public TokenValidationParameters TokenValidationParameters { get; } = new()
{
AuthenticationType = TokenValidationParameters.DefaultAuthenticationType,
ClockSkew = TimeSpan.Zero,
@@ -242,8 +242,7 @@ namespace OpenIddict.Server
/// Note: the list is automatically sorted based on the order assigned to each handler descriptor.
/// As such, it MUST NOT be mutated after options initialization to preserve the exact order.
///
- public List Handlers { get; } =
- new List(OpenIddictServerHandlers.DefaultHandlers);
+ public List Handlers { get; } = new(OpenIddictServerHandlers.DefaultHandlers);
///
/// Gets or sets a boolean determining whether client identification is optional.
@@ -255,7 +254,7 @@ namespace OpenIddict.Server
///
/// Gets the OAuth 2.0/OpenID Connect claims supported by this application.
///
- public HashSet Claims { get; } = new HashSet(StringComparer.Ordinal)
+ public HashSet Claims { get; } = new(StringComparer.Ordinal)
{
OpenIddictConstants.Claims.Audience,
OpenIddictConstants.Claims.ExpiresAt,
@@ -312,12 +311,12 @@ namespace OpenIddict.Server
/// Gets the OAuth 2.0 code challenge methods enabled for this application.
/// By default, only the S256 method is allowed (if the code flow is enabled).
///
- public HashSet CodeChallengeMethods { get; } = new HashSet(StringComparer.Ordinal);
+ public HashSet CodeChallengeMethods { get; } = new(StringComparer.Ordinal);
///
/// Gets the OAuth 2.0/OpenID Connect flows enabled for this application.
///
- public HashSet GrantTypes { get; } = new HashSet(StringComparer.Ordinal);
+ public HashSet GrantTypes { get; } = new(StringComparer.Ordinal);
///
/// Gets or sets a boolean indicating whether PKCE must be used by client applications
@@ -331,13 +330,13 @@ namespace OpenIddict.Server
/// Gets the OAuth 2.0/OpenID Connect response types enabled for this application.
///
[EditorBrowsable(EditorBrowsableState.Advanced)]
- public HashSet ResponseTypes { get; } = new HashSet(StringComparer.Ordinal);
+ public HashSet ResponseTypes { get; } = new(StringComparer.Ordinal);
///
/// Gets the OAuth 2.0/OpenID Connect response modes enabled for this application.
///
[EditorBrowsable(EditorBrowsableState.Advanced)]
- public HashSet ResponseModes { get; } = new HashSet(StringComparer.Ordinal);
+ public HashSet ResponseModes { get; } = new(StringComparer.Ordinal);
///
/// Gets or sets a boolean indicating whether endpoint permissions should be ignored.
@@ -366,7 +365,7 @@ namespace OpenIddict.Server
///
/// Gets the OAuth 2.0/OpenID Connect scopes enabled for this application.
///
- public HashSet Scopes { get; } = new HashSet(StringComparer.Ordinal)
+ public HashSet Scopes { get; } = new(StringComparer.Ordinal)
{
OpenIddictConstants.Scopes.OpenId
};
diff --git a/src/OpenIddict.Validation/OpenIddictValidationOptions.cs b/src/OpenIddict.Validation/OpenIddictValidationOptions.cs
index 6c309962..487b1800 100644
--- a/src/OpenIddict.Validation/OpenIddictValidationOptions.cs
+++ b/src/OpenIddict.Validation/OpenIddictValidationOptions.cs
@@ -35,12 +35,12 @@ namespace OpenIddict.Validation
/// - X.509 keys whose backing certificate is not yet valid are never preferred.
///
///
- public List EncryptionCredentials { get; } = new List();
+ public List EncryptionCredentials { get; } = new();
///
/// Gets or sets the JWT handler used to protect and unprotect tokens.
///
- public JsonWebTokenHandler JsonWebTokenHandler { get; set; } = new JsonWebTokenHandler
+ public JsonWebTokenHandler JsonWebTokenHandler { get; set; } = new()
{
SetDefaultTimesOnTokenCreation = false
};
@@ -50,8 +50,7 @@ namespace OpenIddict.Validation
/// Note: the list is automatically sorted based on the order assigned to each handler descriptor.
/// As such, it MUST NOT be mutated after options initialization to preserve the exact order.
///
- public List Handlers { get; } =
- new List(OpenIddictValidationHandlers.DefaultHandlers);
+ public List Handlers { get; } = new(OpenIddictValidationHandlers.DefaultHandlers);
///
/// Gets or sets the type of validation used by the OpenIddict validation services.
@@ -112,12 +111,12 @@ namespace OpenIddict.Validation
/// Setting this property is recommended when the authorization
/// server issues access tokens for multiple distinct resource servers.
///
- public HashSet Audiences { get; } = new HashSet(StringComparer.Ordinal);
+ public HashSet Audiences { get; } = new(StringComparer.Ordinal);
///
/// Gets the token validation parameters used by the OpenIddict validation services.
///
- public TokenValidationParameters TokenValidationParameters { get; } = new TokenValidationParameters
+ public TokenValidationParameters TokenValidationParameters { get; } = new()
{
AuthenticationType = TokenValidationParameters.DefaultAuthenticationType,
ClockSkew = TimeSpan.Zero,