mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-03 09:12:15 +00:00
Change classes to use PortMapperImpl and PortResolverImpl by default.
This commit is contained in:
parent
c641c445a0
commit
b61c05ff89
@ -19,6 +19,7 @@ import net.sf.acegisecurity.AccessDeniedException;
|
|||||||
import net.sf.acegisecurity.AuthenticationException;
|
import net.sf.acegisecurity.AuthenticationException;
|
||||||
import net.sf.acegisecurity.ui.AbstractProcessingFilter;
|
import net.sf.acegisecurity.ui.AbstractProcessingFilter;
|
||||||
import net.sf.acegisecurity.util.PortResolver;
|
import net.sf.acegisecurity.util.PortResolver;
|
||||||
|
import net.sf.acegisecurity.util.PortResolverImpl;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@ -100,7 +101,7 @@ public class SecurityEnforcementFilter implements Filter, InitializingBean {
|
|||||||
|
|
||||||
private AuthenticationEntryPoint authenticationEntryPoint;
|
private AuthenticationEntryPoint authenticationEntryPoint;
|
||||||
private FilterSecurityInterceptor filterSecurityInterceptor;
|
private FilterSecurityInterceptor filterSecurityInterceptor;
|
||||||
private PortResolver portResolver;
|
private PortResolver portResolver = new PortResolverImpl();
|
||||||
|
|
||||||
//~ Methods ================================================================
|
//~ Methods ================================================================
|
||||||
|
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
package net.sf.acegisecurity.securechannel;
|
package net.sf.acegisecurity.securechannel;
|
||||||
|
|
||||||
import net.sf.acegisecurity.util.PortMapper;
|
import net.sf.acegisecurity.util.PortMapper;
|
||||||
|
import net.sf.acegisecurity.util.PortMapperImpl;
|
||||||
import net.sf.acegisecurity.util.PortResolver;
|
import net.sf.acegisecurity.util.PortResolver;
|
||||||
|
import net.sf.acegisecurity.util.PortResolverImpl;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@ -52,8 +54,8 @@ public class RetryWithHttpEntryPoint implements InitializingBean,
|
|||||||
|
|
||||||
//~ Instance fields ========================================================
|
//~ Instance fields ========================================================
|
||||||
|
|
||||||
private PortMapper portMapper;
|
private PortMapper portMapper = new PortMapperImpl();
|
||||||
private PortResolver portResolver;
|
private PortResolver portResolver = new PortResolverImpl();
|
||||||
|
|
||||||
//~ Methods ================================================================
|
//~ Methods ================================================================
|
||||||
|
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
package net.sf.acegisecurity.securechannel;
|
package net.sf.acegisecurity.securechannel;
|
||||||
|
|
||||||
import net.sf.acegisecurity.util.PortMapper;
|
import net.sf.acegisecurity.util.PortMapper;
|
||||||
|
import net.sf.acegisecurity.util.PortMapperImpl;
|
||||||
import net.sf.acegisecurity.util.PortResolver;
|
import net.sf.acegisecurity.util.PortResolver;
|
||||||
|
import net.sf.acegisecurity.util.PortResolverImpl;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@ -52,8 +54,8 @@ public class RetryWithHttpsEntryPoint implements InitializingBean,
|
|||||||
|
|
||||||
//~ Instance fields ========================================================
|
//~ Instance fields ========================================================
|
||||||
|
|
||||||
private PortMapper portMapper;
|
private PortMapper portMapper = new PortMapperImpl();
|
||||||
private PortResolver portResolver;
|
private PortResolver portResolver = new PortResolverImpl();
|
||||||
|
|
||||||
//~ Methods ================================================================
|
//~ Methods ================================================================
|
||||||
|
|
||||||
|
@ -17,7 +17,9 @@ package net.sf.acegisecurity.ui.webapp;
|
|||||||
|
|
||||||
import net.sf.acegisecurity.intercept.web.AuthenticationEntryPoint;
|
import net.sf.acegisecurity.intercept.web.AuthenticationEntryPoint;
|
||||||
import net.sf.acegisecurity.util.PortMapper;
|
import net.sf.acegisecurity.util.PortMapper;
|
||||||
|
import net.sf.acegisecurity.util.PortMapperImpl;
|
||||||
import net.sf.acegisecurity.util.PortResolver;
|
import net.sf.acegisecurity.util.PortResolver;
|
||||||
|
import net.sf.acegisecurity.util.PortResolverImpl;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@ -63,8 +65,8 @@ public class AuthenticationProcessingFilterEntryPoint
|
|||||||
|
|
||||||
//~ Instance fields ========================================================
|
//~ Instance fields ========================================================
|
||||||
|
|
||||||
private PortMapper portMapper;
|
private PortMapper portMapper = new PortMapperImpl();
|
||||||
private PortResolver portResolver;
|
private PortResolver portResolver = new PortResolverImpl();
|
||||||
private String loginFormUrl;
|
private String loginFormUrl;
|
||||||
private boolean forceHttps = false;
|
private boolean forceHttps = false;
|
||||||
|
|
||||||
|
@ -233,6 +233,7 @@ public class SecurityEnforcementFilterTests extends TestCase {
|
|||||||
false, false));
|
false, false));
|
||||||
filter.setAuthenticationEntryPoint(new MockAuthenticationEntryPoint(
|
filter.setAuthenticationEntryPoint(new MockAuthenticationEntryPoint(
|
||||||
"/login.jsp"));
|
"/login.jsp"));
|
||||||
|
filter.setPortResolver(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
filter.afterPropertiesSet();
|
filter.afterPropertiesSet();
|
||||||
|
@ -45,7 +45,7 @@ public class RetryWithHttpEntryPointTests extends TestCase {
|
|||||||
|
|
||||||
public void testDetectsMissingPortMapper() throws Exception {
|
public void testDetectsMissingPortMapper() throws Exception {
|
||||||
RetryWithHttpEntryPoint ep = new RetryWithHttpEntryPoint();
|
RetryWithHttpEntryPoint ep = new RetryWithHttpEntryPoint();
|
||||||
ep.setPortResolver(new MockPortResolver(80, 443));
|
ep.setPortMapper(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ep.afterPropertiesSet();
|
ep.afterPropertiesSet();
|
||||||
@ -57,7 +57,7 @@ public class RetryWithHttpEntryPointTests extends TestCase {
|
|||||||
|
|
||||||
public void testDetectsMissingPortResolver() throws Exception {
|
public void testDetectsMissingPortResolver() throws Exception {
|
||||||
RetryWithHttpEntryPoint ep = new RetryWithHttpEntryPoint();
|
RetryWithHttpEntryPoint ep = new RetryWithHttpEntryPoint();
|
||||||
ep.setPortMapper(new PortMapperImpl());
|
ep.setPortResolver(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ep.afterPropertiesSet();
|
ep.afterPropertiesSet();
|
||||||
|
@ -45,7 +45,7 @@ public class RetryWithHttpsEntryPointTests extends TestCase {
|
|||||||
|
|
||||||
public void testDetectsMissingPortMapper() throws Exception {
|
public void testDetectsMissingPortMapper() throws Exception {
|
||||||
RetryWithHttpsEntryPoint ep = new RetryWithHttpsEntryPoint();
|
RetryWithHttpsEntryPoint ep = new RetryWithHttpsEntryPoint();
|
||||||
ep.setPortResolver(new MockPortResolver(80, 443));
|
ep.setPortMapper(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ep.afterPropertiesSet();
|
ep.afterPropertiesSet();
|
||||||
@ -57,7 +57,7 @@ public class RetryWithHttpsEntryPointTests extends TestCase {
|
|||||||
|
|
||||||
public void testDetectsMissingPortResolver() throws Exception {
|
public void testDetectsMissingPortResolver() throws Exception {
|
||||||
RetryWithHttpsEntryPoint ep = new RetryWithHttpsEntryPoint();
|
RetryWithHttpsEntryPoint ep = new RetryWithHttpsEntryPoint();
|
||||||
ep.setPortMapper(new PortMapperImpl());
|
ep.setPortResolver(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ep.afterPropertiesSet();
|
ep.afterPropertiesSet();
|
||||||
|
@ -60,7 +60,7 @@ public class AuthenticationProcessingFilterEntryPointTests extends TestCase {
|
|||||||
public void testDetectsMissingPortMapper() throws Exception {
|
public void testDetectsMissingPortMapper() throws Exception {
|
||||||
AuthenticationProcessingFilterEntryPoint ep = new AuthenticationProcessingFilterEntryPoint();
|
AuthenticationProcessingFilterEntryPoint ep = new AuthenticationProcessingFilterEntryPoint();
|
||||||
ep.setLoginFormUrl("xxx");
|
ep.setLoginFormUrl("xxx");
|
||||||
ep.setPortResolver(new MockPortResolver(80, 443));
|
ep.setPortMapper(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ep.afterPropertiesSet();
|
ep.afterPropertiesSet();
|
||||||
@ -73,7 +73,7 @@ public class AuthenticationProcessingFilterEntryPointTests extends TestCase {
|
|||||||
public void testDetectsMissingPortResolver() throws Exception {
|
public void testDetectsMissingPortResolver() throws Exception {
|
||||||
AuthenticationProcessingFilterEntryPoint ep = new AuthenticationProcessingFilterEntryPoint();
|
AuthenticationProcessingFilterEntryPoint ep = new AuthenticationProcessingFilterEntryPoint();
|
||||||
ep.setLoginFormUrl("xxx");
|
ep.setLoginFormUrl("xxx");
|
||||||
ep.setPortMapper(new PortMapperImpl());
|
ep.setPortResolver(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ep.afterPropertiesSet();
|
ep.afterPropertiesSet();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user