use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method toEndpointIdShouldMatchEndpointPath.
@Test
void toEndpointIdShouldMatchEndpointPath() {
ServerWebExchangeMatcher matcher = EndpointRequest.to("foo");
assertMatcher(matcher).matches("/actuator/foo");
}
use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method toLinksWhenBasePathEmptyShouldNotMatch.
@Test
void toLinksWhenBasePathEmptyShouldNotMatch() {
ServerWebExchangeMatcher matcher = EndpointRequest.toLinks();
RequestMatcherAssert assertMatcher = assertMatcher(matcher, "");
assertMatcher.doesNotMatch("/actuator/foo");
assertMatcher.doesNotMatch("/actuator/bar");
assertMatcher.doesNotMatch("/");
}
use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method noEndpointPathsBeansShouldNeverMatch.
@Test
void noEndpointPathsBeansShouldNeverMatch() {
ServerWebExchangeMatcher matcher = EndpointRequest.toAnyEndpoint();
assertMatcher(matcher, (PathMappedEndpoints) null).doesNotMatch("/actuator/foo");
assertMatcher(matcher, (PathMappedEndpoints) null).doesNotMatch("/actuator/bar");
}
use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method toEndpointClassShouldNotMatchOtherPath.
@Test
void toEndpointClassShouldNotMatchOtherPath() {
ServerWebExchangeMatcher matcher = EndpointRequest.to(FooEndpoint.class);
assertMatcher(matcher).doesNotMatch("/actuator/bar");
}
use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method toLinksShouldOnlyMatchLinks.
@Test
void toLinksShouldOnlyMatchLinks() {
ServerWebExchangeMatcher matcher = EndpointRequest.toLinks();
assertMatcher(matcher).doesNotMatch("/actuator/foo");
assertMatcher(matcher).doesNotMatch("/actuator/bar");
assertMatcher(matcher).matches("/actuator");
assertMatcher(matcher).matches("/actuator/");
}
Aggregations