mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-08 11:32:47 +00:00
SEC-2508: Passivity test for SEC-2357
This commit is contained in:
parent
3b13c1fdf4
commit
49738e4588
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2013 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.springframework.security.config;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@ContextConfiguration("classpath:org/springframework/security/config/sec-2508.xml" )
|
||||||
|
public class Sec2508Tests {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AuthenticationEntryPoint ep;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void loads() {}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
|
|
||||||
|
<bean class="org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint">
|
||||||
|
<constructor-arg>
|
||||||
|
<map>
|
||||||
|
<entry>
|
||||||
|
<key>
|
||||||
|
<bean class="org.springframework.security.web.util.AntPathRequestMatcher">
|
||||||
|
<constructor-arg value="/**"/>
|
||||||
|
</bean>
|
||||||
|
</key>
|
||||||
|
<bean class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</constructor-arg>
|
||||||
|
<property name="defaultEntryPoint">
|
||||||
|
<bean class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
Loading…
x
Reference in New Issue
Block a user