Add Missing AuthorizationRequestRepository in Snippet

Closes PR-13099
This commit is contained in:
moli 2023-04-26 10:54:43 +08:00 committed by Josh Cummings
parent 3469bcb822
commit b6f3cb71e6
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
1 changed files with 11 additions and 2 deletions

View File

@ -276,9 +276,18 @@ public class OAuth2ClientSecurityConfig {
.authorizationRequestRepository(this.authorizationRequestRepository())
...
)
);
return http.build();
.oauth2Login(oauth2 -> oauth2
.authorizationEndpoint(endpoint -> endpoint
.authorizationRequestRepository(this.authorizationRequestRepository())
...
)
).build();
}
@Bean
public AuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository() {
return new CustomOAuth2AuthorizationRequestRepository();
}
}
----