public abstract class WebTestUtils extends Object
Modifier and Type | Method and Description |
---|---|
static CsrfTokenRepository |
getCsrfTokenRepository(javax.servlet.http.HttpServletRequest request)
Gets the
CsrfTokenRepository for the specified
HttpServletRequest . |
static SecurityContextRepository |
getSecurityContextRepository(javax.servlet.http.HttpServletRequest request)
Gets the
SecurityContextRepository for the specified
HttpServletRequest . |
public static SecurityContextRepository getSecurityContextRepository(javax.servlet.http.HttpServletRequest request)
SecurityContextRepository
for the specified
HttpServletRequest
. If one is not found, a default
HttpSessionSecurityContextRepository
is used.request
- the HttpServletRequest
to obtain the
SecurityContextRepository
SecurityContextRepository
for the specified
HttpServletRequest
public static CsrfTokenRepository getCsrfTokenRepository(javax.servlet.http.HttpServletRequest request)
CsrfTokenRepository
for the specified
HttpServletRequest
. If one is not found, the default
HttpSessionCsrfTokenRepository
is used.request
- the HttpServletRequest
to obtain the
CsrfTokenRepository
CsrfTokenRepository
for the specified
HttpServletRequest