Skip to content

Commit b6f3cb7

Browse files
BingChunMoLijzheaux
authored andcommitted
Add Missing AuthorizationRequestRepository in Snippet
Closes PR-13099
1 parent 3469bcb commit b6f3cb7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/modules/ROOT/pages/servlet/oauth2/client/authorization-grants.adoc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,18 @@ public class OAuth2ClientSecurityConfig {
276276
.authorizationRequestRepository(this.authorizationRequestRepository())
277277
...
278278
)
279-
);
280-
return http.build();
279+
.oauth2Login(oauth2 -> oauth2
280+
.authorizationEndpoint(endpoint -> endpoint
281+
.authorizationRequestRepository(this.authorizationRequestRepository())
282+
...
283+
)
284+
).build();
281285
}
286+
287+
@Bean
288+
public AuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository() {
289+
return new CustomOAuth2AuthorizationRequestRepository();
290+
}
282291
}
283292
----
284293

0 commit comments

Comments
 (0)