From 4ef16b14d281939088f9bb82201761c1881b4cad Mon Sep 17 00:00:00 2001 From: Rob Winch <362503+rwinch@users.noreply.github.com> Date: Mon, 22 Sep 2025 10:09:04 -0500 Subject: [PATCH] Update terminology to HTTP Service Clients Closes gh-17947 --- docs/modules/ROOT/nav.adoc | 2 +- ...nterface.adoc => http-service-client.adoc} | 28 +++++++++---------- .../oauth2/client/authorized-clients.adoc | 4 +-- docs/modules/ROOT/pages/whats-new.adoc | 4 +-- .../clientregistrationid/UserService.java | 2 +- .../rest/clientregistrationid/UserService.kt | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) rename docs/modules/ROOT/pages/features/integrations/rest/{http-interface.adoc => http-service-client.adoc} (52%) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 68f8b20c32..ca28e4700e 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -21,7 +21,7 @@ *** xref:features/exploits/http.adoc[HTTP Requests] ** xref:features/integrations/index.adoc[Integrations] *** REST Client -**** xref:features/integrations/rest/http-interface.adoc[HTTP Interface Integration] +**** xref:features/integrations/rest/http-service-client.adoc[HTTP Service Clients] *** xref:features/integrations/cryptography.adoc[Cryptography] *** xref:features/integrations/data.adoc[Spring Data] *** xref:features/integrations/concurrency.adoc[Java's Concurrency APIs] diff --git a/docs/modules/ROOT/pages/features/integrations/rest/http-interface.adoc b/docs/modules/ROOT/pages/features/integrations/rest/http-service-client.adoc similarity index 52% rename from docs/modules/ROOT/pages/features/integrations/rest/http-interface.adoc rename to docs/modules/ROOT/pages/features/integrations/rest/http-service-client.adoc index 3ee8ef1520..691857099d 100644 --- a/docs/modules/ROOT/pages/features/integrations/rest/http-interface.adoc +++ b/docs/modules/ROOT/pages/features/integrations/rest/http-service-client.adoc @@ -1,55 +1,55 @@ -= HTTP Interface Integration += HTTP Service Clients Integration -Spring Security's OAuth Support can integrate with `RestClient` and `WebClient` {spring-framework-reference-url}/integration/rest-clients.html[HTTP Interface based REST Clients]. +Spring Security's OAuth Support can integrate with `RestClient` and `WebClient` {spring-framework-reference-url}integration/rest-clients.html#rest-http-service-client[HTTP Service Clients]. [[configuration]] == Configuration -After xref:features/integrations/rest/http-interface.adoc#configuration-restclient[RestClient] or xref:features/integrations/rest/http-interface.adoc#configuration-webclient[WebClient] specific configuration, usage of xref:features/integrations/rest/http-interface.adoc[] only requires adding a xref:features/integrations/rest/http-interface.adoc#client-registration-id[`@ClientRegistrationId`] to methods that require OAuth or their declaring HTTP interface. +After xref:features/integrations/rest/http-service-client.adoc#configuration-restclient[RestClient] or xref:features/integrations/rest/http-service-client.adoc#configuration-webclient[WebClient] specific configuration, usage of xref:features/integrations/rest/http-service-client.adoc[] only requires adding a xref:features/integrations/rest/http-service-client.adoc#client-registration-id[`@ClientRegistrationId`] to methods that require OAuth or their declaring HTTP interface. -Since the presence of xref:features/integrations/rest/http-interface.adoc#client-registration-id[`@ClientRegistrationId`] determines if and how the OAuth token will be resolved, it is safe to add Spring Security's OAuth support any configuration. +Since the presence of xref:features/integrations/rest/http-service-client.adoc#client-registration-id[`@ClientRegistrationId`] determines if and how the OAuth token will be resolved, it is safe to add Spring Security's OAuth support any configuration. [[configuration-restclient]] === RestClient Configuration -Spring Security's OAuth Support can integrate with {spring-framework-reference-url}/integration/rest-clients.html[HTTP Interface based REST Clients] backed by RestClient. +Spring Security's OAuth Support can integrate with {spring-framework-reference-url}integration/rest-clients.html#rest-http-service-client[HTTP Service Clients] backed by `RestClient`. The first step is to xref:servlet/oauth2/client/core.adoc#oauth2Client-authorized-manager-provider[create an `OAuthAuthorizedClientManager` Bean]. -Next you must configure `HttpServiceProxyFactory` and `RestClient` to be aware of xref:./http-interface.adoc#client-registration-id[@ClientRegistrationId] +Next you must configure `HttpServiceProxyFactory` and `RestClient` to be aware of xref:./http-service-client.adoc#client-registration-id[@ClientRegistrationId] To simplify this configuration, use javadoc:org.springframework.security.oauth2.client.web.client.support.OAuth2RestClientHttpServiceGroupConfigurer[]. include-code::./RestClientHttpInterfaceIntegrationConfiguration[tag=config,indent=0] The configuration: -- Adds xref:features/integrations/rest/http-interface.adoc#client-registration-id-processor[`ClientRegistrationIdProcessor`] to {spring-framework-reference-url}/integration/rest-clients.html#rest-http-interface[`HttpServiceProxyFactory`] +- Adds xref:features/integrations/rest/http-service-client.adoc#client-registration-id-processor[`ClientRegistrationIdProcessor`] to {spring-framework-reference-url}integration/rest-clients.html#rest-http-service-client[`HttpServiceProxyFactory`] - Adds xref:servlet/oauth2/client/authorized-clients.adoc#oauth2-client-rest-client[`OAuth2ClientHttpRequestInterceptor`] to the `RestClient` [[configuration-webclient]] === WebClient Configuration -Spring Security's OAuth Support can integrate with {spring-framework-reference-url}/integration/rest-clients.html[HTTP Interface based REST Clients] backed by `WebClient`. +Spring Security's OAuth Support can integrate with {spring-framework-reference-url}integration/rest-clients.html#rest-http-service-client[HTTP Service Clients] backed by `WebClient`. The first step is to xref:reactive/oauth2/client/core.adoc#oauth2Client-authorized-manager-provider[create an `ReactiveOAuthAuthorizedClientManager` Bean]. -Next you must configure `HttpServiceProxyFactory` and `WebRestClient` to be aware of xref:./http-interface.adoc#client-registration-id[@ClientRegistrationId] +Next you must configure `HttpServiceProxyFactory` and `WebRestClient` to be aware of xref:./http-service-client.adoc#client-registration-id[@ClientRegistrationId] To simplify this configuration, use javadoc:org.springframework.security.oauth2.client.web.reactive.function.client.support.OAuth2WebClientHttpServiceGroupConfigurer[]. include-code::./ServerWebClientHttpInterfaceIntegrationConfiguration[tag=config,indent=0] The configuration: -- Adds xref:features/integrations/rest/http-interface.adoc#client-registration-id-processor[`ClientRegistrationIdProcessor`] to {spring-framework-reference-url}/integration/rest-clients.html#rest-http-interface[`HttpServiceProxyFactory`] +- Adds xref:features/integrations/rest/http-service-client.adoc#client-registration-id-processor[`ClientRegistrationIdProcessor`] to {spring-framework-reference-url}/integration/rest-clients.html#rest-http-service-client[`HttpServiceProxyFactory`] - Adds xref:reactive/oauth2/client/authorized-clients.adoc#oauth2-client-web-client[`ServerOAuth2AuthorizedClientExchangeFilterFunction`] to the `WebClient` [[client-registration-id]] == @ClientRegistrationId -You can add the javadoc:org.springframework.security.oauth2.client.annotation.ClientRegistrationId[] on the HTTP Interface to specify which javadoc:org.springframework.security.oauth2.client.registration.ClientRegistration[] to use. +You can add the javadoc:org.springframework.security.oauth2.client.annotation.ClientRegistrationId[] on the HTTP Service to specify which javadoc:org.springframework.security.oauth2.client.registration.ClientRegistration[] to use. include-code::./UserService[tag=getAuthenticatedUser] -The xref:features/integrations/rest/http-interface.adoc#client-registration-id[`@ClientRegistrationId`] will be processed by xref:features/integrations/rest/http-interface.adoc#client-registration-id-processor[`ClientRegistrationIdProcessor`] +The xref:features/integrations/rest/http-service-client.adoc#client-registration-id[`@ClientRegistrationId`] will be processed by xref:features/integrations/rest/http-service-client.adoc#client-registration-id-processor[`ClientRegistrationIdProcessor`] [[type]] === Type Level Declarations @@ -61,9 +61,9 @@ include-code::./UserService[tag=type] [[client-registration-id-processor]] == `ClientRegistrationIdProcessor` -The xref:features/integrations/rest/http-interface.adoc#configuration[configured] javadoc:org.springframework.security.oauth2.client.web.client.ClientRegistrationIdProcessor[] will: +The xref:features/integrations/rest/http-service-client.adoc#configuration[configured] javadoc:org.springframework.security.oauth2.client.web.client.ClientRegistrationIdProcessor[] will: -- Automatically invoke javadoc:org.springframework.security.oauth2.client.web.ClientAttributes#clientRegistrationId(java.lang.String)[] for each xref:features/integrations/rest/http-interface.adoc#client-registration-id[`@ClientRegistrationId`]. +- Automatically invoke javadoc:org.springframework.security.oauth2.client.web.ClientAttributes#clientRegistrationId(java.lang.String)[] for each xref:features/integrations/rest/http-service-client.adoc#client-registration-id[`@ClientRegistrationId`]. - This adds the javadoc:org.springframework.security.oauth2.client.registration.ClientRegistration#getId()[] to the attributes The `id` is then processed by: diff --git a/docs/modules/ROOT/pages/servlet/oauth2/client/authorized-clients.adoc b/docs/modules/ROOT/pages/servlet/oauth2/client/authorized-clients.adoc index 43b2c24e7a..99cb850482 100644 --- a/docs/modules/ROOT/pages/servlet/oauth2/client/authorized-clients.adoc +++ b/docs/modules/ROOT/pages/servlet/oauth2/client/authorized-clients.adoc @@ -495,9 +495,9 @@ class RestClientConfig { ===== [[oauth2-client-rest-client-interface]] -=== HTTP Interface Integration +=== HTTP Service Clients -Spring Security's OAuth support integrates with xref:features/integrations/rest/http-interface.adoc[]. +Spring Security's OAuth support integrates with xref:features/integrations/rest/http-service-client.adoc[]. [[oauth2-client-web-client]] == [[oauth2Client-webclient-servlet]]WebClient Integration for Servlet Environments diff --git a/docs/modules/ROOT/pages/whats-new.adoc b/docs/modules/ROOT/pages/whats-new.adoc index 60b9184f47..3958db00af 100644 --- a/docs/modules/ROOT/pages/whats-new.adoc +++ b/docs/modules/ROOT/pages/whats-new.adoc @@ -56,10 +56,10 @@ http.csrf((csrf) -> csrf.spa()); == OAuth 2.0 * Removed support for password grant -* Added OAuth2 Support for xref:features/integrations/rest/http-interface.adoc[HTTP Interface Integration] +* Added OAuth2 Support for xref:features/integrations/rest/http-service-client.adoc[HTTP Service Clients] * Added support for custom `JwkSource` in `NimbusJwtDecoder`, allowing usage of Nimbus's `JwkSourceBuilder` API * Added builder for `NimbusJwtEncoder`, supports specifying an EC or RSA key pair or a secret key -* Added support for `@ClientRegistrationId` at the xref:features/integrations/rest/http-interface.adoc#type[type level], eliminating the need for method level repetition +* Added support for `@ClientRegistrationId` at the xref:features/integrations/rest/http-service-client.adoc#type[type level], eliminating the need for method level repetition == SAML 2.0 diff --git a/docs/src/test/java/org/springframework/security/docs/features/integrations/rest/clientregistrationid/UserService.java b/docs/src/test/java/org/springframework/security/docs/features/integrations/rest/clientregistrationid/UserService.java index 35ec7a1454..e13df87f10 100644 --- a/docs/src/test/java/org/springframework/security/docs/features/integrations/rest/clientregistrationid/UserService.java +++ b/docs/src/test/java/org/springframework/security/docs/features/integrations/rest/clientregistrationid/UserService.java @@ -21,7 +21,7 @@ import org.springframework.web.service.annotation.GetExchange; import org.springframework.web.service.annotation.HttpExchange; /** - * Demonstrates a service for {@link ClientRegistrationId} and HTTP Interface clients. + * Demonstrates a service for {@link ClientRegistrationId} and HTTP Service clients. * @author Rob Winch */ @HttpExchange diff --git a/docs/src/test/kotlin/org/springframework/security/kt/docs/features/integrations/rest/clientregistrationid/UserService.kt b/docs/src/test/kotlin/org/springframework/security/kt/docs/features/integrations/rest/clientregistrationid/UserService.kt index fd44d5748b..9dc2d76c07 100644 --- a/docs/src/test/kotlin/org/springframework/security/kt/docs/features/integrations/rest/clientregistrationid/UserService.kt +++ b/docs/src/test/kotlin/org/springframework/security/kt/docs/features/integrations/rest/clientregistrationid/UserService.kt @@ -21,7 +21,7 @@ import org.springframework.web.service.annotation.GetExchange import org.springframework.web.service.annotation.HttpExchange /** - * Demonstrates a service for {@link ClientRegistrationId} and HTTP Interface clients. + * Demonstrates a service for {@link ClientRegistrationId} and HTTP Service Clients. * @author Rob Winch */ @HttpExchange