Browse Source

Move OpenIddictResources.resx

pull/1169/head
Kévin Chalet 6 years ago
parent
commit
916d3c213b
  1. 3
      src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj
  2. 0
      src/OpenIddict.Abstractions/OpenIddictResources.resx
  3. 4
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs
  4. 4
      src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs
  5. 41
      src/OpenIddict.Server/OpenIddictServerOptions.cs
  6. 11
      src/OpenIddict.Validation/OpenIddictValidationOptions.cs

3
src/OpenIddict.Abstractions/OpenIddict.Abstractions.csproj

@ -31,8 +31,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="**\*.resx" Namespace="OpenIddict.Abstractions" <EmbeddedResource Update="**\*.resx" GenerateSource="true" GenerateResourcesCodeAsConstants="true" />
GenerateSource="true" GenerateResourcesCodeAsConstants="true" />
</ItemGroup> </ItemGroup>
</Project> </Project>

0
src/OpenIddict.Abstractions/Resources/OpenIddictResources.resx → src/OpenIddict.Abstractions/OpenIddictResources.resx

4
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs

@ -104,7 +104,7 @@ namespace OpenIddict.Server.AspNetCore
/// <summary> /// <summary>
/// Gets or sets the caching policy used by the authorization endpoint. /// Gets or sets the caching policy used by the authorization endpoint.
/// </summary> /// </summary>
public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new()
{ {
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1), AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30) SlidingExpiration = TimeSpan.FromMinutes(30)
@ -113,7 +113,7 @@ namespace OpenIddict.Server.AspNetCore
/// <summary> /// <summary>
/// Gets or sets the caching policy used by the logout endpoint. /// Gets or sets the caching policy used by the logout endpoint.
/// </summary> /// </summary>
public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new()
{ {
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1), AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30) SlidingExpiration = TimeSpan.FromMinutes(30)

4
src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs

@ -101,7 +101,7 @@ namespace OpenIddict.Server.Owin
/// <summary> /// <summary>
/// Gets or sets the caching policy used by the authorization endpoint. /// Gets or sets the caching policy used by the authorization endpoint.
/// </summary> /// </summary>
public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions public DistributedCacheEntryOptions AuthorizationRequestCachingPolicy { get; set; } = new()
{ {
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1), AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30) SlidingExpiration = TimeSpan.FromMinutes(30)
@ -110,7 +110,7 @@ namespace OpenIddict.Server.Owin
/// <summary> /// <summary>
/// Gets or sets the caching policy used by the logout endpoint. /// Gets or sets the caching policy used by the logout endpoint.
/// </summary> /// </summary>
public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new DistributedCacheEntryOptions public DistributedCacheEntryOptions LogoutRequestCachingPolicy { get; set; } = new()
{ {
AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1), AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1),
SlidingExpiration = TimeSpan.FromMinutes(30) SlidingExpiration = TimeSpan.FromMinutes(30)

41
src/OpenIddict.Server/OpenIddictServerOptions.cs

@ -43,7 +43,7 @@ namespace OpenIddict.Server
/// <item><description>X.509 keys whose backing certificate is not yet valid are never preferred.</description></item> /// <item><description>X.509 keys whose backing certificate is not yet valid are never preferred.</description></item>
/// </list> /// </list>
/// </remarks> /// </remarks>
public List<EncryptingCredentials> EncryptionCredentials { get; } = new List<EncryptingCredentials>(); public List<EncryptingCredentials> EncryptionCredentials { get; } = new();
/// <summary> /// <summary>
/// Gets the list of signing credentials used by the OpenIddict server services. /// Gets the list of signing credentials used by the OpenIddict server services.
@ -61,17 +61,17 @@ namespace OpenIddict.Server
/// <item><description>X.509 keys whose backing certificate is not yet valid are never preferred.</description></item> /// <item><description>X.509 keys whose backing certificate is not yet valid are never preferred.</description></item>
/// </list> /// </list>
/// </remarks> /// </remarks>
public List<SigningCredentials> SigningCredentials { get; } = new List<SigningCredentials>(); public List<SigningCredentials> SigningCredentials { get; } = new();
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the authorization endpoint. /// Gets the absolute and relative URIs associated to the authorization endpoint.
/// </summary> /// </summary>
public List<Uri> AuthorizationEndpointUris { get; } = new List<Uri>(); public List<Uri> AuthorizationEndpointUris { get; } = new();
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the configuration endpoint. /// Gets the absolute and relative URIs associated to the configuration endpoint.
/// </summary> /// </summary>
public List<Uri> ConfigurationEndpointUris { get; } = new List<Uri> public List<Uri> ConfigurationEndpointUris { get; } = new()
{ {
new Uri("/.well-known/openid-configuration", UriKind.Relative), new Uri("/.well-known/openid-configuration", UriKind.Relative),
new Uri("/.well-known/oauth-authorization-server", UriKind.Relative) new Uri("/.well-known/oauth-authorization-server", UriKind.Relative)
@ -88,42 +88,42 @@ namespace OpenIddict.Server
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the device endpoint. /// Gets the absolute and relative URIs associated to the device endpoint.
/// </summary> /// </summary>
public List<Uri> DeviceEndpointUris { get; } = new List<Uri>(); public List<Uri> DeviceEndpointUris { get; } = new();
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the introspection endpoint. /// Gets the absolute and relative URIs associated to the introspection endpoint.
/// </summary> /// </summary>
public List<Uri> IntrospectionEndpointUris { get; } = new List<Uri>(); public List<Uri> IntrospectionEndpointUris { get; } = new();
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the logout endpoint. /// Gets the absolute and relative URIs associated to the logout endpoint.
/// </summary> /// </summary>
public List<Uri> LogoutEndpointUris { get; } = new List<Uri>(); public List<Uri> LogoutEndpointUris { get; } = new();
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the revocation endpoint. /// Gets the absolute and relative URIs associated to the revocation endpoint.
/// </summary> /// </summary>
public List<Uri> RevocationEndpointUris { get; } = new List<Uri>(); public List<Uri> RevocationEndpointUris { get; } = new();
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the token endpoint. /// Gets the absolute and relative URIs associated to the token endpoint.
/// </summary> /// </summary>
public List<Uri> TokenEndpointUris { get; } = new List<Uri>(); public List<Uri> TokenEndpointUris { get; } = new();
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the userinfo endpoint. /// Gets the absolute and relative URIs associated to the userinfo endpoint.
/// </summary> /// </summary>
public List<Uri> UserinfoEndpointUris { get; } = new List<Uri>(); public List<Uri> UserinfoEndpointUris { get; } = new();
/// <summary> /// <summary>
/// Gets the absolute and relative URIs associated to the verification endpoint. /// Gets the absolute and relative URIs associated to the verification endpoint.
/// </summary> /// </summary>
public List<Uri> VerificationEndpointUris { get; } = new List<Uri>(); public List<Uri> VerificationEndpointUris { get; } = new();
/// <summary> /// <summary>
/// Gets or sets the JWT handler used to protect and unprotect tokens. /// Gets or sets the JWT handler used to protect and unprotect tokens.
/// </summary> /// </summary>
public JsonWebTokenHandler JsonWebTokenHandler { get; set; } = new JsonWebTokenHandler public JsonWebTokenHandler JsonWebTokenHandler { get; set; } = new()
{ {
SetDefaultTimesOnTokenCreation = false SetDefaultTimesOnTokenCreation = false
}; };
@ -131,7 +131,7 @@ namespace OpenIddict.Server
/// <summary> /// <summary>
/// Gets the token validation parameters used by the OpenIddict server services. /// Gets the token validation parameters used by the OpenIddict server services.
/// </summary> /// </summary>
public TokenValidationParameters TokenValidationParameters { get; } = new TokenValidationParameters public TokenValidationParameters TokenValidationParameters { get; } = new()
{ {
AuthenticationType = TokenValidationParameters.DefaultAuthenticationType, AuthenticationType = TokenValidationParameters.DefaultAuthenticationType,
ClockSkew = TimeSpan.Zero, 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. /// 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. /// As such, it MUST NOT be mutated after options initialization to preserve the exact order.
/// </summary> /// </summary>
public List<OpenIddictServerHandlerDescriptor> Handlers { get; } = public List<OpenIddictServerHandlerDescriptor> Handlers { get; } = new(OpenIddictServerHandlers.DefaultHandlers);
new List<OpenIddictServerHandlerDescriptor>(OpenIddictServerHandlers.DefaultHandlers);
/// <summary> /// <summary>
/// Gets or sets a boolean determining whether client identification is optional. /// Gets or sets a boolean determining whether client identification is optional.
@ -255,7 +254,7 @@ namespace OpenIddict.Server
/// <summary> /// <summary>
/// Gets the OAuth 2.0/OpenID Connect claims supported by this application. /// Gets the OAuth 2.0/OpenID Connect claims supported by this application.
/// </summary> /// </summary>
public HashSet<string> Claims { get; } = new HashSet<string>(StringComparer.Ordinal) public HashSet<string> Claims { get; } = new(StringComparer.Ordinal)
{ {
OpenIddictConstants.Claims.Audience, OpenIddictConstants.Claims.Audience,
OpenIddictConstants.Claims.ExpiresAt, OpenIddictConstants.Claims.ExpiresAt,
@ -312,12 +311,12 @@ namespace OpenIddict.Server
/// Gets the OAuth 2.0 code challenge methods enabled for this application. /// 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). /// By default, only the S256 method is allowed (if the code flow is enabled).
/// </summary> /// </summary>
public HashSet<string> CodeChallengeMethods { get; } = new HashSet<string>(StringComparer.Ordinal); public HashSet<string> CodeChallengeMethods { get; } = new(StringComparer.Ordinal);
/// <summary> /// <summary>
/// Gets the OAuth 2.0/OpenID Connect flows enabled for this application. /// Gets the OAuth 2.0/OpenID Connect flows enabled for this application.
/// </summary> /// </summary>
public HashSet<string> GrantTypes { get; } = new HashSet<string>(StringComparer.Ordinal); public HashSet<string> GrantTypes { get; } = new(StringComparer.Ordinal);
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether PKCE must be used by client applications /// 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. /// Gets the OAuth 2.0/OpenID Connect response types enabled for this application.
/// </summary> /// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced)] [EditorBrowsable(EditorBrowsableState.Advanced)]
public HashSet<string> ResponseTypes { get; } = new HashSet<string>(StringComparer.Ordinal); public HashSet<string> ResponseTypes { get; } = new(StringComparer.Ordinal);
/// <summary> /// <summary>
/// Gets the OAuth 2.0/OpenID Connect response modes enabled for this application. /// Gets the OAuth 2.0/OpenID Connect response modes enabled for this application.
/// </summary> /// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced)] [EditorBrowsable(EditorBrowsableState.Advanced)]
public HashSet<string> ResponseModes { get; } = new HashSet<string>(StringComparer.Ordinal); public HashSet<string> ResponseModes { get; } = new(StringComparer.Ordinal);
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether endpoint permissions should be ignored. /// Gets or sets a boolean indicating whether endpoint permissions should be ignored.
@ -366,7 +365,7 @@ namespace OpenIddict.Server
/// <summary> /// <summary>
/// Gets the OAuth 2.0/OpenID Connect scopes enabled for this application. /// Gets the OAuth 2.0/OpenID Connect scopes enabled for this application.
/// </summary> /// </summary>
public HashSet<string> Scopes { get; } = new HashSet<string>(StringComparer.Ordinal) public HashSet<string> Scopes { get; } = new(StringComparer.Ordinal)
{ {
OpenIddictConstants.Scopes.OpenId OpenIddictConstants.Scopes.OpenId
}; };

11
src/OpenIddict.Validation/OpenIddictValidationOptions.cs

@ -35,12 +35,12 @@ namespace OpenIddict.Validation
/// <item><description>X.509 keys whose backing certificate is not yet valid are never preferred.</description></item> /// <item><description>X.509 keys whose backing certificate is not yet valid are never preferred.</description></item>
/// </list> /// </list>
/// </remarks> /// </remarks>
public List<EncryptingCredentials> EncryptionCredentials { get; } = new List<EncryptingCredentials>(); public List<EncryptingCredentials> EncryptionCredentials { get; } = new();
/// <summary> /// <summary>
/// Gets or sets the JWT handler used to protect and unprotect tokens. /// Gets or sets the JWT handler used to protect and unprotect tokens.
/// </summary> /// </summary>
public JsonWebTokenHandler JsonWebTokenHandler { get; set; } = new JsonWebTokenHandler public JsonWebTokenHandler JsonWebTokenHandler { get; set; } = new()
{ {
SetDefaultTimesOnTokenCreation = false SetDefaultTimesOnTokenCreation = false
}; };
@ -50,8 +50,7 @@ namespace OpenIddict.Validation
/// Note: the list is automatically sorted based on the order assigned to each handler descriptor. /// 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. /// As such, it MUST NOT be mutated after options initialization to preserve the exact order.
/// </summary> /// </summary>
public List<OpenIddictValidationHandlerDescriptor> Handlers { get; } = public List<OpenIddictValidationHandlerDescriptor> Handlers { get; } = new(OpenIddictValidationHandlers.DefaultHandlers);
new List<OpenIddictValidationHandlerDescriptor>(OpenIddictValidationHandlers.DefaultHandlers);
/// <summary> /// <summary>
/// Gets or sets the type of validation used by the OpenIddict validation services. /// 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 /// Setting this property is recommended when the authorization
/// server issues access tokens for multiple distinct resource servers. /// server issues access tokens for multiple distinct resource servers.
/// </summary> /// </summary>
public HashSet<string> Audiences { get; } = new HashSet<string>(StringComparer.Ordinal); public HashSet<string> Audiences { get; } = new(StringComparer.Ordinal);
/// <summary> /// <summary>
/// Gets the token validation parameters used by the OpenIddict validation services. /// Gets the token validation parameters used by the OpenIddict validation services.
/// </summary> /// </summary>
public TokenValidationParameters TokenValidationParameters { get; } = new TokenValidationParameters public TokenValidationParameters TokenValidationParameters { get; } = new()
{ {
AuthenticationType = TokenValidationParameters.DefaultAuthenticationType, AuthenticationType = TokenValidationParameters.DefaultAuthenticationType,
ClockSkew = TimeSpan.Zero, ClockSkew = TimeSpan.Zero,

Loading…
Cancel
Save