public class

DefaultSavedRequest

extends Object
implements SavedRequest
java.lang.Object
   ↳ org.springframework.security.web.savedrequest.DefaultSavedRequest

Class Overview

Represents central information from a HttpServletRequest.

This class is used by AbstractAuthenticationProcessingFilter and org.springframework.security.web.savedrequest.SavedRequestAwareWrapper to reproduce the request after successful authentication. An instance of this class is stored at the time of an authentication exception by ExceptionTranslationFilter.

IMPLEMENTATION NOTE: It is assumed that this object is accessed only from the context of a single thread, so no synchronization around internal collection classes is performed.

This class is based on code in Apache Tomcat.

Summary

Fields
protected static final Log logger
Public Constructors
DefaultSavedRequest(HttpServletRequest request, PortResolver portResolver)
Public Methods
boolean doesRequestMatch(HttpServletRequest request, PortResolver portResolver)
Determines if the current request matches the DefaultSavedRequest.
String getContextPath()
List<Cookie> getCookies()
Collection<String> getHeaderNames()
List<String> getHeaderValues(String name)
List<Locale> getLocales()
String getMethod()
Map<StringString[]> getParameterMap()
Collection<String> getParameterNames()
String[] getParameterValues(String name)
String getPathInfo()
String getQueryString()
String getRedirectUrl()
Indicates the URL that the user agent used for this request.
String getRequestURI()
String getRequestURL()
String getScheme()
String getServerName()
int getServerPort()
String getServletPath()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.web.savedrequest.SavedRequest

Fields

protected static final Log logger

Public Constructors

public DefaultSavedRequest (HttpServletRequest request, PortResolver portResolver)

Public Methods

public boolean doesRequestMatch (HttpServletRequest request, PortResolver portResolver)

Determines if the current request matches the DefaultSavedRequest.

All URL arguments are considered but not cookies, locales, headers or parameters.

Parameters
request the actual request to be matched against this one
portResolver used to obtain the server port of the request
Returns
  • true if the request is deemed to match this one.

public String getContextPath ()

public List<Cookie> getCookies ()

public Collection<String> getHeaderNames ()

public List<String> getHeaderValues (String name)

public List<Locale> getLocales ()

public String getMethod ()

public Map<StringString[]> getParameterMap ()

public Collection<String> getParameterNames ()

public String[] getParameterValues (String name)

public String getPathInfo ()

public String getQueryString ()

public String getRedirectUrl ()

Indicates the URL that the user agent used for this request.

Returns
  • the full URL of this request

public String getRequestURI ()

public String getRequestURL ()

public String getScheme ()

public String getServerName ()

public int getServerPort ()

public String getServletPath ()

public String toString ()