public class SpringSecurityWebProcessingContextBuilder extends SpringWebProcessingContextBuilder
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_AUTHENTICATION_MANAGER_BEAN_NAME |
static String |
DEFAULT_PASSWORD_VARIABLE_NAME |
static String |
DEFAULT_USERNAME_VARIABLE_NAME |
DEFAULT_APPLICATION_CONTEXT_CONFIG_LOCATION, DEFAULT_BINDING_MODEL_VARIABLE_NAMEDEFAULT_LOCALE| Constructor and Description |
|---|
SpringSecurityWebProcessingContextBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.security.core.Authentication |
getAuthentication(org.springframework.context.ApplicationContext applicationContext,
ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
Computes and returns a Spring Security
Authentication object to be used
for authenticating the desired user for testing purposes. |
String |
getAuthenticationManagerBeanName() |
protected void |
initSpring(org.springframework.context.ApplicationContext applicationContext,
ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables) |
void |
setAuthenticationManagerBeanName(String authenticationManagerBeanName) |
createApplicationContext, doAdditionalVariableProcessing, doCreateWebContextInstance, getApplicationContextConfigLocation, getShareAppContextForAllTests, initBinder, initBindingResult, setApplicationContextConfigLocation, setShareAppContextForAllTestsbuildpublic static final String DEFAULT_AUTHENTICATION_MANAGER_BEAN_NAME
public static final String DEFAULT_USERNAME_VARIABLE_NAME
public static final String DEFAULT_PASSWORD_VARIABLE_NAME
public SpringSecurityWebProcessingContextBuilder()
public String getAuthenticationManagerBeanName()
public void setAuthenticationManagerBeanName(String authenticationManagerBeanName)
protected final void initSpring(org.springframework.context.ApplicationContext applicationContext,
ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
initSpring in class SpringWebProcessingContextBuilderprotected org.springframework.security.core.Authentication getAuthentication(org.springframework.context.ApplicationContext applicationContext,
ITest test,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,Object> variables)
Computes and returns a Spring Security Authentication object to be used
for authenticating the desired user for testing purposes.
By default, an UsernamePasswordAuthenticationToken object is returned,
built with the values of two context variables:
If one or both of these variables are not present, null is returned and therefore no user will be considered to be authenticated.
applicationContext - the application context, already initializedtest - the ITest objectrequest - the HTTP request objectresponse - the HTTP response objectservletContext - the ServletContext objectlocale - the locale being used for this testvariables - the context variablesCopyright © 2015 The THYMELEAF team. All rights reserved.