mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-14 08:02:22 +00:00
Updating gitignore and removing unnecessary casts from FilterChainProxyConfigTests.
This commit is contained in:
parent
072b73354f
commit
e58f982351
5
.gitignore
vendored
5
.gitignore
vendored
@ -3,9 +3,14 @@ target/
|
|||||||
.project
|
.project
|
||||||
.settings/
|
.settings/
|
||||||
build/
|
build/
|
||||||
|
out/
|
||||||
|
intellij/
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
*.log
|
*.log
|
||||||
*.log.1
|
*.log.1
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.iml
|
*.iml
|
||||||
.gradle/
|
.gradle/
|
||||||
gradle.properties
|
gradle.properties
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
@ -70,40 +70,40 @@ public class FilterChainProxyConfigTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void normalOperation() throws Exception {
|
public void normalOperation() throws Exception {
|
||||||
FilterChainProxy filterChainProxy = (FilterChainProxy) appCtx.getBean("filterChain", FilterChainProxy.class);
|
FilterChainProxy filterChainProxy = appCtx.getBean("filterChain", FilterChainProxy.class);
|
||||||
doNormalOperation(filterChainProxy);
|
doNormalOperation(filterChainProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void normalOperationWithNewConfig() throws Exception {
|
public void normalOperationWithNewConfig() throws Exception {
|
||||||
FilterChainProxy filterChainProxy = (FilterChainProxy) appCtx.getBean("newFilterChainProxy", FilterChainProxy.class);
|
FilterChainProxy filterChainProxy = appCtx.getBean("newFilterChainProxy", FilterChainProxy.class);
|
||||||
checkPathAndFilterOrder(filterChainProxy);
|
checkPathAndFilterOrder(filterChainProxy);
|
||||||
doNormalOperation(filterChainProxy);
|
doNormalOperation(filterChainProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void normalOperationWithNewConfigRegex() throws Exception {
|
public void normalOperationWithNewConfigRegex() throws Exception {
|
||||||
FilterChainProxy filterChainProxy = (FilterChainProxy) appCtx.getBean("newFilterChainProxyRegex", FilterChainProxy.class);
|
FilterChainProxy filterChainProxy = appCtx.getBean("newFilterChainProxyRegex", FilterChainProxy.class);
|
||||||
checkPathAndFilterOrder(filterChainProxy);
|
checkPathAndFilterOrder(filterChainProxy);
|
||||||
doNormalOperation(filterChainProxy);
|
doNormalOperation(filterChainProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void normalOperationWithNewConfigNonNamespace() throws Exception {
|
public void normalOperationWithNewConfigNonNamespace() throws Exception {
|
||||||
FilterChainProxy filterChainProxy = (FilterChainProxy) appCtx.getBean("newFilterChainProxyNonNamespace", FilterChainProxy.class);
|
FilterChainProxy filterChainProxy = appCtx.getBean("newFilterChainProxyNonNamespace", FilterChainProxy.class);
|
||||||
checkPathAndFilterOrder(filterChainProxy);
|
checkPathAndFilterOrder(filterChainProxy);
|
||||||
doNormalOperation(filterChainProxy);
|
doNormalOperation(filterChainProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void pathWithNoMatchHasNoFilters() throws Exception {
|
public void pathWithNoMatchHasNoFilters() throws Exception {
|
||||||
FilterChainProxy filterChainProxy = (FilterChainProxy) appCtx.getBean("newFilterChainProxyNoDefaultPath", FilterChainProxy.class);
|
FilterChainProxy filterChainProxy = appCtx.getBean("newFilterChainProxyNoDefaultPath", FilterChainProxy.class);
|
||||||
assertEquals(null, filterChainProxy.getFilters("/nomatch"));
|
assertEquals(null, filterChainProxy.getFilters("/nomatch"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void urlStrippingPropertyIsRespected() throws Exception {
|
public void urlStrippingPropertyIsRespected() throws Exception {
|
||||||
FilterChainProxy filterChainProxy = (FilterChainProxy) appCtx.getBean("newFilterChainProxyNoDefaultPath", FilterChainProxy.class);
|
FilterChainProxy filterChainProxy = appCtx.getBean("newFilterChainProxyNoDefaultPath", FilterChainProxy.class);
|
||||||
|
|
||||||
// Should only match if we are stripping the query string
|
// Should only match if we are stripping the query string
|
||||||
String url = "/blah.bar?x=something";
|
String url = "/blah.bar?x=something";
|
||||||
@ -116,7 +116,7 @@ public class FilterChainProxyConfigTests {
|
|||||||
// SEC-1235
|
// SEC-1235
|
||||||
@Test
|
@Test
|
||||||
public void mixingPatternsAndPlaceholdersDoesntCauseOrderingIssues() throws Exception {
|
public void mixingPatternsAndPlaceholdersDoesntCauseOrderingIssues() throws Exception {
|
||||||
FilterChainProxy filterChainProxy = (FilterChainProxy) appCtx.getBean("sec1235FilterChainProxy", FilterChainProxy.class);
|
FilterChainProxy filterChainProxy = appCtx.getBean("sec1235FilterChainProxy", FilterChainProxy.class);
|
||||||
|
|
||||||
String[] paths = filterChainProxy.getFilterChainMap().keySet().toArray(new String[0]);
|
String[] paths = filterChainProxy.getFilterChainMap().keySet().toArray(new String[0]);
|
||||||
assertEquals("/login*", paths[0]);
|
assertEquals("/login*", paths[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user