use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method excludeLinksShouldNotMatchBasePath.
@Test
void excludeLinksShouldNotMatchBasePath() {
ServerWebExchangeMatcher matcher = EndpointRequest.toAnyEndpoint().excludingLinks();
assertMatcher(matcher).doesNotMatch("/actuator");
assertMatcher(matcher).matches("/actuator/foo");
assertMatcher(matcher).matches("/actuator/bar");
}
use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method toAnyEndpointShouldNotMatchOtherPath.
@Test
void toAnyEndpointShouldNotMatchOtherPath() {
ServerWebExchangeMatcher matcher = EndpointRequest.toAnyEndpoint();
assertMatcher(matcher).doesNotMatch("/actuator/baz");
}
use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method toAnyEndpointShouldMatchEndpointPathWithTrailingSlash.
@Test
void toAnyEndpointShouldMatchEndpointPathWithTrailingSlash() {
ServerWebExchangeMatcher matcher = EndpointRequest.toAnyEndpoint();
assertMatcher(matcher).matches("/actuator/foo/");
assertMatcher(matcher).matches("/actuator/bar/");
assertMatcher(matcher).matches("/actuator/");
}
use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class EndpointRequestTests method toAnyEndpointShouldMatchEndpointPath.
@Test
void toAnyEndpointShouldMatchEndpointPath() {
ServerWebExchangeMatcher matcher = EndpointRequest.toAnyEndpoint();
assertMatcher(matcher).matches("/actuator/foo");
assertMatcher(matcher).matches("/actuator/bar");
assertMatcher(matcher).matches("/actuator");
}
use of org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher in project spring-boot by spring-projects.
the class StaticResourceRequestTests method atLocationShouldMatchLocation.
@Test
void atLocationShouldMatchLocation() {
ServerWebExchangeMatcher matcher = this.resourceRequest.at(StaticResourceLocation.CSS);
assertMatcher(matcher).matches("/css/file.css");
assertMatcher(matcher).doesNotMatch("/js/file.js");
}
Aggregations