瀏覽代碼

Polish docs for WebClient OAuth2 Servlet Setup

Joe Grandja 6 年之前
父節點
當前提交
88f8bfeb57
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      docs/manual/src/docs/asciidoc/_includes/servlet/additional-topics/webclient.adoc

+ 6 - 6
docs/manual/src/docs/asciidoc/_includes/servlet/additional-topics/webclient.adoc

@@ -29,15 +29,15 @@ Spring Security builds on this support to provide additional benefits:
 == WebClient OAuth2 Setup
 
 The first step is ensuring to setup the `WebClient` correctly.
-An example of setting up `WebClient` in a fully reactive environment can be found below:
+An example of setting up `WebClient` in a servlet environment can be found below:
 
 [source,java]
 ----
 @Bean
-WebClient webClient(ReactiveClientRegistrationRepository clientRegistrations,
-		ServerOAuth2AuthorizedClientRepository authorizedClients) {
-	ServerOAuth2AuthorizedClientExchangeFilterFunction oauth =
-			new ServerOAuth2AuthorizedClientExchangeFilterFunction(clientRegistrations, authorizedClients);
+WebClient webClient(ClientRegistrationRepository clientRegistrations,
+		OAuth2AuthorizedClientRepository authorizedClients) {
+	ServletOAuth2AuthorizedClientExchangeFilterFunction oauth =
+			new ServletOAuth2AuthorizedClientExchangeFilterFunction(clientRegistrations, authorizedClients);
 	// (optional) explicitly opt into using the oauth2Login to provide an access token implicitly
 	// oauth.setDefaultOAuth2AuthorizedClient(true);
 	// (optional) set a default ClientRegistration.registrationId
@@ -67,7 +67,7 @@ Mono<String> body = this.webClient
 [[servlet-webclient-explicit]]
 == Explicit OAuth2AuthorizedClient
 
-The `OAuth2AuthorizedClient` can be explicitly provided by setting it on the requests attributes.
+The `OAuth2AuthorizedClient` can be explicitly provided by setting it on the request attributes.
 In the example below we resolve the `OAuth2AuthorizedClient` using Spring WebFlux or Spring MVC argument resolver support.
 However, it does not matter how the `OAuth2AuthorizedClient` is resolved.