浏览代码

Add JavaDoc to reactive oauth2Login

Eleftheria Stein 6 年之前
父节点
当前提交
fbf6d22343

+ 18 - 0
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.
+	 *
+	 * <pre class="code">
+	 *  &#064;Bean
+	 *  public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
+	 *      http
+	 *          // ...
+	 *          .oauth2Login()
+	 *              .authenticationConverter(authenticationConverter)
+	 *              .authenticationManager(manager);
+	 *      return http.build();
+	 *  }
+	 * </pre>
+	 *
+	 *
+	 * @return the {@link OAuth2LoginSpec} to customize
+	 */
 	public OAuth2LoginSpec oauth2Login() {
 		if (this.oauth2Login == null) {
 			this.oauth2Login = new OAuth2LoginSpec();