public interface

PortResolver

org.springframework.security.web.PortResolver
Known Indirect Subclasses

Class Overview

A PortResolver determines the port a web request was received on.

This interface is necessary because ServletRequest.getServerPort() may not return the correct port in certain circumstances. For example, if the browser does not construct the URL correctly after a redirect.

Summary

Public Methods
abstract int getServerPort(ServletRequest request)
Indicates the port the ServletRequest was received on.

Public Methods

public abstract 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