From a27a12556f94f98228c2528953667303a0777d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Wed, 11 Sep 2024 15:33:18 +0200 Subject: [PATCH] Rename HandleConfigurationRequestContext.CryptographyEndpoint to JsonWebKeySetEndpoint to match the recent endpoint changes --- .../OpenIddictClientHandlers.Discovery.cs | 8 ++++---- src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs | 2 +- .../OpenIddictServerHandlers.Discovery.cs | 4 ++-- .../OpenIddictValidationHandlers.Discovery.cs | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs b/src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs index 327103f5d..39327e7a6 100644 --- a/src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs +++ b/src/OpenIddict.Client/OpenIddictClientHandlers.Discovery.cs @@ -24,7 +24,7 @@ public static class Discovery HandleConfigurationErrorResponse.Descriptor, ValidateIssuer.Descriptor, ExtractAuthorizationEndpoint.Descriptor, - ExtractCryptographyEndpoint.Descriptor, + ExtractJsonWebKeySetEndpoint.Descriptor, ExtractDeviceAuthorizationEndpoint.Descriptor, ExtractIntrospectionEndpoint.Descriptor, ExtractLogoutEndpoint.Descriptor, @@ -295,14 +295,14 @@ public ValueTask HandleAsync(HandleConfigurationResponseContext context) /// /// Contains the logic responsible for extracting the JSON Web Key Set endpoint URI from the discovery document. /// - public sealed class ExtractCryptographyEndpoint : IOpenIddictClientHandler + public sealed class ExtractJsonWebKeySetEndpoint : IOpenIddictClientHandler { /// /// Gets the default descriptor definition assigned to this handler. /// public static OpenIddictClientHandlerDescriptor Descriptor { get; } = OpenIddictClientHandlerDescriptor.CreateBuilder() - .UseSingletonHandler() + .UseSingletonHandler() .SetOrder(ExtractAuthorizationEndpoint.Descriptor.Order + 1_000) .SetType(OpenIddictClientHandlerType.BuiltIn) .Build(); @@ -355,7 +355,7 @@ public sealed class ExtractDeviceAuthorizationEndpoint : IOpenIddictClientHandle public static OpenIddictClientHandlerDescriptor Descriptor { get; } = OpenIddictClientHandlerDescriptor.CreateBuilder() .UseSingletonHandler() - .SetOrder(ExtractCryptographyEndpoint.Descriptor.Order + 1_000) + .SetOrder(ExtractJsonWebKeySetEndpoint.Descriptor.Order + 1_000) .SetType(OpenIddictClientHandlerType.BuiltIn) .Build(); diff --git a/src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs b/src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs index e67bc7563..46f1cf4d8 100644 --- a/src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs +++ b/src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs @@ -99,7 +99,7 @@ public OpenIddictRequest Request /// /// Gets or sets the JSON Web Key Set endpoint URI. /// - public Uri? CryptographyEndpoint { get; set; } + public Uri? JsonWebKeySetEndpoint { get; set; } /// /// Gets or sets the device authorization endpoint URI. diff --git a/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs b/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs index 7471a20bd..f26d748cc 100644 --- a/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs +++ b/src/OpenIddict.Server/OpenIddictServerHandlers.Discovery.cs @@ -241,7 +241,7 @@ public async ValueTask HandleAsync(ProcessRequestContext context) [Metadata.RevocationEndpoint] = notification.RevocationEndpoint?.AbsoluteUri, [Metadata.UserInfoEndpoint] = notification.UserInfoEndpoint?.AbsoluteUri, [Metadata.DeviceAuthorizationEndpoint] = notification.DeviceAuthorizationEndpoint?.AbsoluteUri, - [Metadata.JwksUri] = notification.CryptographyEndpoint?.AbsoluteUri, + [Metadata.JwksUri] = notification.JsonWebKeySetEndpoint?.AbsoluteUri, [Metadata.GrantTypesSupported] = notification.GrantTypes.ToArray(), [Metadata.ResponseTypesSupported] = notification.ResponseTypes.ToArray(), [Metadata.ResponseModesSupported] = notification.ResponseModes.ToArray(), @@ -371,7 +371,7 @@ public ValueTask HandleAsync(HandleConfigurationRequestContext context) context.AuthorizationEndpoint ??= OpenIddictHelpers.CreateAbsoluteUri( context.BaseUri, context.Options.AuthorizationEndpointUris.FirstOrDefault()); - context.CryptographyEndpoint ??= OpenIddictHelpers.CreateAbsoluteUri( + context.JsonWebKeySetEndpoint ??= OpenIddictHelpers.CreateAbsoluteUri( context.BaseUri, context.Options.JsonWebKeySetEndpointUris.FirstOrDefault()); context.DeviceAuthorizationEndpoint ??= OpenIddictHelpers.CreateAbsoluteUri( diff --git a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs index 5dc846221..cee1c6232 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationHandlers.Discovery.cs @@ -23,7 +23,7 @@ public static class Discovery ValidateWellKnownConfigurationParameters.Descriptor, HandleConfigurationErrorResponse.Descriptor, ValidateIssuer.Descriptor, - ExtractCryptographyEndpoint.Descriptor, + ExtractJsonWebKeySetEndpoint.Descriptor, ExtractIntrospectionEndpoint.Descriptor, ExtractIntrospectionEndpointClientAuthenticationMethods.Descriptor, @@ -213,14 +213,14 @@ public ValueTask HandleAsync(HandleConfigurationResponseContext context) /// /// Contains the logic responsible for extracting the JSON Web Key Set endpoint URI from the discovery document. /// - public sealed class ExtractCryptographyEndpoint : IOpenIddictValidationHandler + public sealed class ExtractJsonWebKeySetEndpoint : IOpenIddictValidationHandler { /// /// Gets the default descriptor definition assigned to this handler. /// public static OpenIddictValidationHandlerDescriptor Descriptor { get; } = OpenIddictValidationHandlerDescriptor.CreateBuilder() - .UseSingletonHandler() + .UseSingletonHandler() .SetOrder(ValidateIssuer.Descriptor.Order + 1_000) .SetType(OpenIddictValidationHandlerType.BuiltIn) .Build(); @@ -273,7 +273,7 @@ public sealed class ExtractIntrospectionEndpoint : IOpenIddictValidationHandler< public static OpenIddictValidationHandlerDescriptor Descriptor { get; } = OpenIddictValidationHandlerDescriptor.CreateBuilder() .UseSingletonHandler() - .SetOrder(ExtractCryptographyEndpoint.Descriptor.Order + 1_000) + .SetOrder(ExtractJsonWebKeySetEndpoint.Descriptor.Order + 1_000) .SetType(OpenIddictValidationHandlerType.BuiltIn) .Build();