Skip to content

Commit

Permalink
Rename event handlers and event properties that whose endpoint name h…
Browse files Browse the repository at this point in the history
…as changed
  • Loading branch information
kevinchalet committed Sep 15, 2024
1 parent 55665dc commit 3662b17
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static class Discovery
DisposeHttpResponse<ExtractConfigurationResponseContext>.Descriptor,

/*
* Cryptography request processing:
* JSON Web Key Set request processing:
*/
CreateHttpClient<PrepareJsonWebKeySetRequestContext>.Descriptor,
PrepareGetHttpRequest<PrepareJsonWebKeySetRequestContext>.Descriptor,
Expand Down
26 changes: 13 additions & 13 deletions src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class Discovery
ExtractJsonWebKeySetEndpoint.Descriptor,
ExtractDeviceAuthorizationEndpoint.Descriptor,
ExtractIntrospectionEndpoint.Descriptor,
ExtractLogoutEndpoint.Descriptor,
ExtractEndSessionEndpoint.Descriptor,
ExtractRevocationEndpoint.Descriptor,
ExtractTokenEndpoint.Descriptor,
ExtractUserInfoEndpoint.Descriptor,
Expand All @@ -43,10 +43,10 @@ public static class Discovery
ExtractTokenEndpointClientAuthenticationMethods.Descriptor,

/*
* Cryptography response handling:
* JSON Web Key Set response handling:
*/
ValidateWellKnownCryptographyParameters.Descriptor,
HandleCryptographyErrorResponse.Descriptor,
ValidateWellKnownJsonWebKeySetParameters.Descriptor,
HandleJsonWebKeySetErrorResponse.Descriptor,
ExtractSigningKeys.Descriptor
]);

Expand Down Expand Up @@ -433,14 +433,14 @@ public ValueTask HandleAsync(HandleConfigurationResponseContext context)
/// <summary>
/// Contains the logic responsible for extracting the end session endpoint URI from the discovery document.
/// </summary>
public sealed class ExtractLogoutEndpoint : IOpenIddictClientHandler<HandleConfigurationResponseContext>
public sealed class ExtractEndSessionEndpoint : IOpenIddictClientHandler<HandleConfigurationResponseContext>
{
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
= OpenIddictClientHandlerDescriptor.CreateBuilder<HandleConfigurationResponseContext>()
.UseSingletonHandler<ExtractLogoutEndpoint>()
.UseSingletonHandler<ExtractEndSessionEndpoint>()
.SetOrder(ExtractIntrospectionEndpoint.Descriptor.Order + 1_000)
.SetType(OpenIddictClientHandlerType.BuiltIn)
.Build();
Expand Down Expand Up @@ -484,7 +484,7 @@ public sealed class ExtractRevocationEndpoint : IOpenIddictClientHandler<HandleC
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
= OpenIddictClientHandlerDescriptor.CreateBuilder<HandleConfigurationResponseContext>()
.UseSingletonHandler<ExtractRevocationEndpoint>()
.SetOrder(ExtractLogoutEndpoint.Descriptor.Order + 1_000)
.SetOrder(ExtractEndSessionEndpoint.Descriptor.Order + 1_000)
.SetType(OpenIddictClientHandlerType.BuiltIn)
.Build();

Expand Down Expand Up @@ -1021,14 +1021,14 @@ public ValueTask HandleAsync(HandleConfigurationResponseContext context)
/// <summary>
/// Contains the logic responsible for validating the well-known parameters contained in the JSON Web Key Set response.
/// </summary>
public sealed class ValidateWellKnownCryptographyParameters : IOpenIddictClientHandler<HandleJsonWebKeySetResponseContext>
public sealed class ValidateWellKnownJsonWebKeySetParameters : IOpenIddictClientHandler<HandleJsonWebKeySetResponseContext>
{
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
= OpenIddictClientHandlerDescriptor.CreateBuilder<HandleJsonWebKeySetResponseContext>()
.UseSingletonHandler<ValidateWellKnownCryptographyParameters>()
.UseSingletonHandler<ValidateWellKnownJsonWebKeySetParameters>()
.SetOrder(int.MinValue + 100_000)
.SetType(OpenIddictClientHandlerType.BuiltIn)
.Build();
Expand Down Expand Up @@ -1095,15 +1095,15 @@ static bool ValidateObjectArray(JsonElement element)
/// <summary>
/// Contains the logic responsible for surfacing potential errors from the JSON Web Key Set response.
/// </summary>
public sealed class HandleCryptographyErrorResponse : IOpenIddictClientHandler<HandleJsonWebKeySetResponseContext>
public sealed class HandleJsonWebKeySetErrorResponse : IOpenIddictClientHandler<HandleJsonWebKeySetResponseContext>
{
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
= OpenIddictClientHandlerDescriptor.CreateBuilder<HandleJsonWebKeySetResponseContext>()
.UseSingletonHandler<HandleCryptographyErrorResponse>()
.SetOrder(ValidateWellKnownCryptographyParameters.Descriptor.Order + 1_000)
.UseSingletonHandler<HandleJsonWebKeySetErrorResponse>()
.SetOrder(ValidateWellKnownJsonWebKeySetParameters.Descriptor.Order + 1_000)
.SetType(OpenIddictClientHandlerType.BuiltIn)
.Build();

Expand Down Expand Up @@ -1146,7 +1146,7 @@ public sealed class ExtractSigningKeys : IOpenIddictClientHandler<HandleJsonWebK
public static OpenIddictClientHandlerDescriptor Descriptor { get; }
= OpenIddictClientHandlerDescriptor.CreateBuilder<HandleJsonWebKeySetResponseContext>()
.UseSingletonHandler<ExtractSigningKeys>()
.SetOrder(HandleCryptographyErrorResponse.Descriptor.Order + 1_000)
.SetOrder(HandleJsonWebKeySetErrorResponse.Descriptor.Order + 1_000)
.SetType(OpenIddictClientHandlerType.BuiltIn)
.Build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public static class Discovery
ProcessJsonResponse<ApplyConfigurationResponseContext>.Descriptor,

/*
* Cryptography request extraction:
* JSON Web Key Set request extraction:
*/
ExtractGetRequest<ExtractJsonWebKeySetRequestContext>.Descriptor,

/*
* Cryptography response processing:
* JSON Web Key Set response processing:
*/
AttachHttpResponseCode<ApplyJsonWebKeySetResponseContext>.Descriptor,
AttachWwwAuthenticateHeader<ApplyJsonWebKeySetResponseContext>.Descriptor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ public static class Session
{
public static ImmutableArray<OpenIddictServerHandlerDescriptor> DefaultHandlers { get; } = ImmutableArray.Create([
/*
* Logout request extraction:
* End-session request extraction:
*/
ExtractGetOrPostRequest<ExtractEndSessionRequestContext>.Descriptor,
RestoreCachedRequestParameters.Descriptor,
CacheRequestParameters.Descriptor,

/*
* Logout request handling:
* End-session request handling:
*/
EnablePassthroughMode<HandleEndSessionRequestContext, RequireEndSessionEndpointPassthroughEnabled>.Descriptor,

/*
* Logout response processing:
* End-session response processing:
*/
RemoveCachedRequest.Descriptor,
AttachHttpResponseCode<ApplyEndSessionResponseContext>.Descriptor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public static class Discovery
ProcessJsonResponse<ApplyConfigurationResponseContext>.Descriptor,

/*
* Cryptography request extraction:
* JSON Web Key Set request extraction:
*/
ExtractGetRequest<ExtractJsonWebKeySetRequestContext>.Descriptor,

/*
* Cryptography response processing:
* JSON Web Key Set response processing:
*/
AttachHttpResponseCode<ApplyJsonWebKeySetResponseContext>.Descriptor,
AttachOwinResponseChallenge<ApplyJsonWebKeySetResponseContext>.Descriptor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ public static class Session
{
public static ImmutableArray<OpenIddictServerHandlerDescriptor> DefaultHandlers { get; } = ImmutableArray.Create([
/*
* Logout request extraction:
* End-session request extraction:
*/
ExtractGetOrPostRequest<ExtractEndSessionRequestContext>.Descriptor,
RestoreCachedRequestParameters.Descriptor,
CacheRequestParameters.Descriptor,

/*
* Logout request handling:
* End-session request handling:
*/
EnablePassthroughMode<HandleEndSessionRequestContext, RequireEndSessionEndpointPassthroughEnabled>.Descriptor,

/*
* Logout response processing:
* End-session response processing:
*/
RemoveCachedRequest.Descriptor,
AttachHttpResponseCode<ApplyEndSessionResponseContext>.Descriptor,
Expand Down
8 changes: 4 additions & 4 deletions src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ public OpenIddictRequest Request
public Uri? DeviceAuthorizationEndpoint { get; set; }

/// <summary>
/// Gets or sets the introspection endpoint URI.
/// Gets or sets the end session endpoint URI.
/// </summary>
public Uri? IntrospectionEndpoint { get; set; }
public Uri? EndSessionEndpoint { get; set; }

/// <summary>
/// Gets or sets the end session endpoint URI.
/// Gets or sets the introspection endpoint URI.
/// </summary>
public Uri? LogoutEndpoint { get; set; }
public Uri? IntrospectionEndpoint { get; set; }

/// <summary>
/// Gets or sets the revocation endpoint URI.
Expand Down
8 changes: 4 additions & 4 deletions src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static class Discovery
AttachAdditionalMetadata.Descriptor,

/*
* Cryptography request top-level processing:
* JSON Web Key Set request top-level processing:
*/
ExtractJsonWebKeySetRequest.Descriptor,
ValidateJsonWebKeySetRequest.Descriptor,
Expand All @@ -54,7 +54,7 @@ public static class Discovery
ApplyJsonWebKeySetResponse<ProcessRequestContext>.Descriptor,

/*
* Cryptography request handling:
* JSON Web Key Set request handling:
*/
AttachSigningKeys.Descriptor
]);
Expand Down Expand Up @@ -237,7 +237,7 @@ public async ValueTask HandleAsync(ProcessRequestContext context)
[Metadata.AuthorizationEndpoint] = notification.AuthorizationEndpoint?.AbsoluteUri,
[Metadata.TokenEndpoint] = notification.TokenEndpoint?.AbsoluteUri,
[Metadata.IntrospectionEndpoint] = notification.IntrospectionEndpoint?.AbsoluteUri,
[Metadata.EndSessionEndpoint] = notification.LogoutEndpoint?.AbsoluteUri,
[Metadata.EndSessionEndpoint] = notification.EndSessionEndpoint?.AbsoluteUri,
[Metadata.RevocationEndpoint] = notification.RevocationEndpoint?.AbsoluteUri,
[Metadata.UserInfoEndpoint] = notification.UserInfoEndpoint?.AbsoluteUri,
[Metadata.DeviceAuthorizationEndpoint] = notification.DeviceAuthorizationEndpoint?.AbsoluteUri,
Expand Down Expand Up @@ -380,7 +380,7 @@ public ValueTask HandleAsync(HandleConfigurationRequestContext context)
context.IntrospectionEndpoint ??= OpenIddictHelpers.CreateAbsoluteUri(
context.BaseUri, context.Options.IntrospectionEndpointUris.FirstOrDefault());

context.LogoutEndpoint ??= OpenIddictHelpers.CreateAbsoluteUri(
context.EndSessionEndpoint ??= OpenIddictHelpers.CreateAbsoluteUri(
context.BaseUri, context.Options.EndSessionEndpointUris.FirstOrDefault());

context.RevocationEndpoint ??= OpenIddictHelpers.CreateAbsoluteUri(
Expand Down
8 changes: 4 additions & 4 deletions src/OpenIddict.Server/OpenIddictServerHandlers.Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class Session
{
public static ImmutableArray<OpenIddictServerHandlerDescriptor> DefaultHandlers { get; } = ImmutableArray.Create([
/*
* Logout request top-level processing:
* End-session request top-level processing:
*/
ExtractEndSessionRequest.Descriptor,
ValidateEndSessionRequest.Descriptor,
Expand All @@ -31,7 +31,7 @@ public static class Session
ApplyEndSessionResponse<ProcessSignOutContext>.Descriptor,

/*
* Logout request validation:
* End-session request validation:
*/
ValidatePostLogoutRedirectUriParameter.Descriptor,
ValidateAuthentication.Descriptor,
Expand All @@ -40,12 +40,12 @@ public static class Session
ValidateAuthorizedParty.Descriptor,

/*
* Logout request handling:
* End-session request handling:
*/
AttachPrincipal.Descriptor,

/*
* Logout response processing:
* End-session response processing:
*/
AttachPostLogoutRedirectUri.Descriptor,
AttachResponseState.Descriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static class Discovery
DisposeHttpResponse<ExtractConfigurationResponseContext>.Descriptor,

/*
* Cryptography request processing:
* JSON Web Key Set request processing:
*/
CreateHttpClient<PrepareJsonWebKeySetRequestContext>.Descriptor,
PrepareGetHttpRequest<PrepareJsonWebKeySetRequestContext>.Descriptor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public static class Discovery
ExtractIntrospectionEndpointClientAuthenticationMethods.Descriptor,

/*
* Cryptography response handling:
* JSON Web Key Set response handling:
*/
ValidateWellKnownCryptographyParameters.Descriptor,
HandleCryptographyErrorResponse.Descriptor,
ValidateWellKnownJsonWebKeySetParameters.Descriptor,
HandleJsonWebKeySetErrorResponse.Descriptor,
ExtractSigningKeys.Descriptor
]);

Expand Down Expand Up @@ -351,14 +351,14 @@ public ValueTask HandleAsync(HandleConfigurationResponseContext context)
/// <summary>
/// Contains the logic responsible for validating the well-known parameters contained in the JSON Web Key Set response.
/// </summary>
public sealed class ValidateWellKnownCryptographyParameters : IOpenIddictValidationHandler<HandleJsonWebKeySetResponseContext>
public sealed class ValidateWellKnownJsonWebKeySetParameters : IOpenIddictValidationHandler<HandleJsonWebKeySetResponseContext>
{
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictValidationHandlerDescriptor Descriptor { get; }
= OpenIddictValidationHandlerDescriptor.CreateBuilder<HandleJsonWebKeySetResponseContext>()
.UseSingletonHandler<ValidateWellKnownCryptographyParameters>()
.UseSingletonHandler<ValidateWellKnownJsonWebKeySetParameters>()
.SetOrder(int.MinValue + 100_000)
.SetType(OpenIddictValidationHandlerType.BuiltIn)
.Build();
Expand Down Expand Up @@ -425,15 +425,15 @@ static bool ValidateObjectArray(JsonElement element)
/// <summary>
/// Contains the logic responsible for surfacing potential errors from the JSON Web Key Set response.
/// </summary>
public sealed class HandleCryptographyErrorResponse : IOpenIddictValidationHandler<HandleJsonWebKeySetResponseContext>
public sealed class HandleJsonWebKeySetErrorResponse : IOpenIddictValidationHandler<HandleJsonWebKeySetResponseContext>
{
/// <summary>
/// Gets the default descriptor definition assigned to this handler.
/// </summary>
public static OpenIddictValidationHandlerDescriptor Descriptor { get; }
= OpenIddictValidationHandlerDescriptor.CreateBuilder<HandleJsonWebKeySetResponseContext>()
.UseSingletonHandler<HandleCryptographyErrorResponse>()
.SetOrder(ValidateWellKnownCryptographyParameters.Descriptor.Order + 1_000)
.UseSingletonHandler<HandleJsonWebKeySetErrorResponse>()
.SetOrder(ValidateWellKnownJsonWebKeySetParameters.Descriptor.Order + 1_000)
.SetType(OpenIddictValidationHandlerType.BuiltIn)
.Build();

Expand Down Expand Up @@ -476,7 +476,7 @@ public sealed class ExtractSigningKeys : IOpenIddictValidationHandler<HandleJson
public static OpenIddictValidationHandlerDescriptor Descriptor { get; }
= OpenIddictValidationHandlerDescriptor.CreateBuilder<HandleJsonWebKeySetResponseContext>()
.UseSingletonHandler<ExtractSigningKeys>()
.SetOrder(HandleCryptographyErrorResponse.Descriptor.Order + 1_000)
.SetOrder(HandleJsonWebKeySetErrorResponse.Descriptor.Order + 1_000)
.SetType(OpenIddictValidationHandlerType.BuiltIn)
.Build();

Expand Down
Loading

0 comments on commit 3662b17

Please sign in to comment.