public class

PortResolverImpl

extends Object
implements PortResolver
java.lang.Object
   ↳ org.springframework.security.web.PortResolverImpl

Class Overview

Concrete implementation of PortResolver that obtains the port from ServletRequest.getServerPort().

This class is capable of handling the IE bug which results in an incorrect URL being presented in the header subsequent to a redirect to a different scheme and port where the port is not a well-known number (ie 80 or 443). Handling involves detecting an incorrect response from ServletRequest.getServerPort() for the scheme (eg a HTTP request on 8443) and then determining the real server port (eg HTTP request is really on 8080). The map of valid ports is obtained from the configured PortMapper.

Summary

Public Constructors
PortResolverImpl()
Public Methods
PortMapper getPortMapper()
int getServerPort(ServletRequest request)
Indicates the port the ServletRequest was received on.
void setPortMapper(PortMapper portMapper)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.web.PortResolver

Public Constructors

public PortResolverImpl ()

Public Methods

public PortMapper getPortMapper ()

public int getServerPort (ServletRequest request)

Indicates the port the ServletRequest was received on.

Parameters
request that the method should lookup the port for
Returns
  • the port the request was received on

public void setPortMapper (PortMapper portMapper)