Add ServerWebExchangeMatcherEntry

This commit is contained in:
Rob Winch
2017-05-31 16:09:54 -05:00
parent 915de03f42
commit e5eda24054
4 changed files with 57 additions and 13 deletions

View File

@@ -27,6 +27,7 @@ import org.springframework.security.authorization.AuthorityAuthorizationManager;
import org.springframework.security.authorization.AuthorizationDecision;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher;
import org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcherEntry;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;
@@ -62,8 +63,8 @@ public class DelegatingReactiveAuthorizationManagerTests {
@Before
public void setup() {
manager = DelegatingReactiveAuthorizationManager.builder()
.add(match1, delegate1)
.add(match2, delegate2)
.add(new ServerWebExchangeMatcherEntry<>(match1, delegate1))
.add(new ServerWebExchangeMatcherEntry<>(match2, delegate2))
.build();
}