浏览代码

Add RedirectAuthenticationSuccessHandler(String)

Rob Winch 8 年之前
父节点
当前提交
582a59e583

+ 6 - 0
webflux/src/main/java/org/springframework/security/web/server/authentication/RedirectAuthenticationSuccessHandler.java

@@ -38,6 +38,12 @@ public class RedirectAuthenticationSuccessHandler implements AuthenticationSucce
 
 	private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
 
+	public RedirectAuthenticationSuccessHandler() {}
+
+	public RedirectAuthenticationSuccessHandler(String location) {
+		this.location = URI.create(location);
+	}
+
 	@Override
 	public Mono<Void> success(Authentication authentication, WebFilterExchange webFilterExchange) {
 		ServerWebExchange exchange = webFilterExchange.getExchange();