Skip to content

Commit 8aa55fe

Browse files
committed
Update auth_code ref doc for oauth2-client
1 parent 338b637 commit 8aa55fe

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/manual/src/docs/asciidoc/_includes/servlet/preface/oauth2-client.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ spring:
322322
authorization-grant-type: authorization_code
323323
redirect-uri: "{baseUrl}/authorized/okta"
324324
scope: read, write
325+
provider:
326+
okta:
327+
authorization-uri: https://dev-1234.oktapreview.com/oauth2/v1/authorize
328+
token-uri: https://dev-1234.oktapreview.com/oauth2/v1/token
325329
----
326330

327331
A request with the base path `/oauth2/authorization/okta` will initiate the Authorization Request redirect by the `OAuth2AuthorizationRequestRedirectFilter` and ultimately start the Authorization Code grant flow.
@@ -474,7 +478,7 @@ public class OAuth2ClientSecurityConfig extends WebSecurityConfigurerAdapter {
474478
oauth2Client
475479
.authorizationCodeGrant(authorizationCodeGrant ->
476480
authorizationCodeGrant
477-
.authorizationRequestRepository(this.customAuthorizationRequestRepository())
481+
.authorizationRequestRepository(this.authorizationRequestRepository())
478482
...
479483
)
480484
);
@@ -488,9 +492,7 @@ public class OAuth2ClientSecurityConfig extends WebSecurityConfigurerAdapter {
488492
[NOTE]
489493
Please refer to the https://tools.ietf.org/html/rfc6749#section-4.1.3[Access Token Request/Response] protocol flow for the Authorization Code grant.
490494

491-
The primary role of the `OAuth2AccessTokenResponseClient` is to exchange an authorization grant credential for an access token credential at the Authorization Server's Token Endpoint.
492-
493-
The default implementation of `OAuth2AccessTokenResponseClient` for the Authorization Code grant is `DefaultAuthorizationCodeTokenResponseClient`, which uses a `RestOperations` for exchanging an authorization code for an access token at the Token Endpoint.
495+
The default implementation of `OAuth2AccessTokenResponseClient` for the Authorization Code grant is `DefaultAuthorizationCodeTokenResponseClient`, which uses a `RestOperations` for exchanging an authorization code for an access token at the Authorization Server’s Token Endpoint.
494496

495497
The `DefaultAuthorizationCodeTokenResponseClient` is quite flexible as it allows you to customize the pre-processing of the Token Request and/or post-handling of the Token Response.
496498

@@ -540,7 +542,7 @@ public class OAuth2ClientSecurityConfig extends WebSecurityConfigurerAdapter {
540542
oauth2Client
541543
.authorizationCodeGrant(authorizationCodeGrant ->
542544
authorizationCodeGrant
543-
.accessTokenResponseClient(this.customAccessTokenResponseClient())
545+
.accessTokenResponseClient(this.accessTokenResponseClient())
544546
...
545547
)
546548
);

0 commit comments

Comments
 (0)