diff --git a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java index adff731504..c74744d1d1 100644 --- a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java +++ b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java @@ -677,6 +677,24 @@ public class ServerHttpSecurity { } } + /** + * Configures authentication support using an OAuth 2.0 and/or OpenID Connect 1.0 Provider. + * + *
+ * @Bean
+ * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
+ * http
+ * // ...
+ * .oauth2Login()
+ * .authenticationConverter(authenticationConverter)
+ * .authenticationManager(manager);
+ * return http.build();
+ * }
+ *
+ *
+ *
+ * @return the {@link OAuth2LoginSpec} to customize
+ */
public OAuth2LoginSpec oauth2Login() {
if (this.oauth2Login == null) {
this.oauth2Login = new OAuth2LoginSpec();