|
|
|
@ -20,6 +20,7 @@ using Microsoft.IdentityModel.Tokens; |
|
|
|
using OpenIddict.Abstractions; |
|
|
|
using static OpenIddict.Abstractions.OpenIddictConstants; |
|
|
|
using static OpenIddict.Server.OpenIddictServerEvents; |
|
|
|
using static OpenIddict.Server.OpenIddictServerHandlerFilters; |
|
|
|
|
|
|
|
namespace OpenIddict.Server |
|
|
|
{ |
|
|
|
@ -81,6 +82,7 @@ namespace OpenIddict.Server |
|
|
|
/// </summary>
|
|
|
|
public static OpenIddictServerHandlerDescriptor Descriptor { get; } |
|
|
|
= OpenIddictServerHandlerDescriptor.CreateBuilder<ProcessRequestContext>() |
|
|
|
.AddFilter<RequireConfigurationRequest>() |
|
|
|
.UseScopedHandler<ExtractConfigurationRequest>() |
|
|
|
.SetOrder(100_000) |
|
|
|
.SetType(OpenIddictServerHandlerType.BuiltIn) |
|
|
|
@ -100,11 +102,6 @@ namespace OpenIddict.Server |
|
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.EndpointType != OpenIddictServerEndpointType.Configuration) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var notification = new ExtractConfigurationRequestContext(context.Transaction); |
|
|
|
await _dispatcher.DispatchAsync(notification); |
|
|
|
|
|
|
|
@ -157,6 +154,7 @@ namespace OpenIddict.Server |
|
|
|
/// </summary>
|
|
|
|
public static OpenIddictServerHandlerDescriptor Descriptor { get; } |
|
|
|
= OpenIddictServerHandlerDescriptor.CreateBuilder<ProcessRequestContext>() |
|
|
|
.AddFilter<RequireConfigurationRequest>() |
|
|
|
.UseScopedHandler<ValidateConfigurationRequest>() |
|
|
|
.SetOrder(ExtractConfigurationRequest.Descriptor.Order + 1_000) |
|
|
|
.SetType(OpenIddictServerHandlerType.BuiltIn) |
|
|
|
@ -176,11 +174,6 @@ namespace OpenIddict.Server |
|
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.EndpointType != OpenIddictServerEndpointType.Configuration) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var notification = new ValidateConfigurationRequestContext(context.Transaction); |
|
|
|
await _dispatcher.DispatchAsync(notification); |
|
|
|
|
|
|
|
@ -224,6 +217,7 @@ namespace OpenIddict.Server |
|
|
|
/// </summary>
|
|
|
|
public static OpenIddictServerHandlerDescriptor Descriptor { get; } |
|
|
|
= OpenIddictServerHandlerDescriptor.CreateBuilder<ProcessRequestContext>() |
|
|
|
.AddFilter<RequireConfigurationRequest>() |
|
|
|
.UseScopedHandler<HandleConfigurationRequest>() |
|
|
|
.SetOrder(ValidateConfigurationRequest.Descriptor.Order + 1_000) |
|
|
|
.SetType(OpenIddictServerHandlerType.BuiltIn) |
|
|
|
@ -243,11 +237,6 @@ namespace OpenIddict.Server |
|
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.EndpointType != OpenIddictServerEndpointType.Configuration) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var notification = new HandleConfigurationRequestContext(context.Transaction); |
|
|
|
await _dispatcher.DispatchAsync(notification); |
|
|
|
|
|
|
|
@ -320,6 +309,7 @@ namespace OpenIddict.Server |
|
|
|
/// </summary>
|
|
|
|
public static OpenIddictServerHandlerDescriptor Descriptor { get; } |
|
|
|
= OpenIddictServerHandlerDescriptor.CreateBuilder<TContext>() |
|
|
|
.AddFilter<RequireConfigurationRequest>() |
|
|
|
.UseScopedHandler<ApplyConfigurationResponse<TContext>>() |
|
|
|
.SetOrder(int.MaxValue - 100_000) |
|
|
|
.SetType(OpenIddictServerHandlerType.BuiltIn) |
|
|
|
@ -339,11 +329,6 @@ namespace OpenIddict.Server |
|
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.EndpointType != OpenIddictServerEndpointType.Configuration) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var notification = new ApplyConfigurationResponseContext(context.Transaction); |
|
|
|
await _dispatcher.DispatchAsync(notification); |
|
|
|
|
|
|
|
@ -888,6 +873,7 @@ namespace OpenIddict.Server |
|
|
|
/// </summary>
|
|
|
|
public static OpenIddictServerHandlerDescriptor Descriptor { get; } |
|
|
|
= OpenIddictServerHandlerDescriptor.CreateBuilder<ProcessRequestContext>() |
|
|
|
.AddFilter<RequireCryptographyRequest>() |
|
|
|
.UseScopedHandler<ExtractCryptographyRequest>() |
|
|
|
.SetOrder(100_000) |
|
|
|
.SetType(OpenIddictServerHandlerType.BuiltIn) |
|
|
|
@ -907,11 +893,6 @@ namespace OpenIddict.Server |
|
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.EndpointType != OpenIddictServerEndpointType.Cryptography) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var notification = new ExtractCryptographyRequestContext(context.Transaction); |
|
|
|
await _dispatcher.DispatchAsync(notification); |
|
|
|
|
|
|
|
@ -964,6 +945,7 @@ namespace OpenIddict.Server |
|
|
|
/// </summary>
|
|
|
|
public static OpenIddictServerHandlerDescriptor Descriptor { get; } |
|
|
|
= OpenIddictServerHandlerDescriptor.CreateBuilder<ProcessRequestContext>() |
|
|
|
.AddFilter<RequireCryptographyRequest>() |
|
|
|
.UseScopedHandler<ValidateCryptographyRequest>() |
|
|
|
.SetOrder(ExtractCryptographyRequest.Descriptor.Order + 1_000) |
|
|
|
.SetType(OpenIddictServerHandlerType.BuiltIn) |
|
|
|
@ -983,11 +965,6 @@ namespace OpenIddict.Server |
|
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.EndpointType != OpenIddictServerEndpointType.Cryptography) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var notification = new ValidateCryptographyRequestContext(context.Transaction); |
|
|
|
await _dispatcher.DispatchAsync(notification); |
|
|
|
|
|
|
|
@ -1031,6 +1008,7 @@ namespace OpenIddict.Server |
|
|
|
/// </summary>
|
|
|
|
public static OpenIddictServerHandlerDescriptor Descriptor { get; } |
|
|
|
= OpenIddictServerHandlerDescriptor.CreateBuilder<ProcessRequestContext>() |
|
|
|
.AddFilter<RequireCryptographyRequest>() |
|
|
|
.UseScopedHandler<HandleCryptographyRequest>() |
|
|
|
.SetOrder(ValidateCryptographyRequest.Descriptor.Order + 1_000) |
|
|
|
.SetType(OpenIddictServerHandlerType.BuiltIn) |
|
|
|
@ -1050,11 +1028,6 @@ namespace OpenIddict.Server |
|
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.EndpointType != OpenIddictServerEndpointType.Cryptography) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var notification = new HandleCryptographyRequestContext(context.Transaction); |
|
|
|
await _dispatcher.DispatchAsync(notification); |
|
|
|
|
|
|
|
@ -1170,6 +1143,7 @@ namespace OpenIddict.Server |
|
|
|
/// </summary>
|
|
|
|
public static OpenIddictServerHandlerDescriptor Descriptor { get; } |
|
|
|
= OpenIddictServerHandlerDescriptor.CreateBuilder<TContext>() |
|
|
|
.AddFilter<RequireCryptographyRequest>() |
|
|
|
.UseScopedHandler<ApplyCryptographyResponse<TContext>>() |
|
|
|
.SetOrder(int.MaxValue - 100_000) |
|
|
|
.SetType(OpenIddictServerHandlerType.BuiltIn) |
|
|
|
@ -1189,11 +1163,6 @@ namespace OpenIddict.Server |
|
|
|
throw new ArgumentNullException(nameof(context)); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.EndpointType != OpenIddictServerEndpointType.Cryptography) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var notification = new ApplyCryptographyResponseContext(context.Transaction); |
|
|
|
await _dispatcher.DispatchAsync(notification); |
|
|
|
|
|
|
|
|