Example usage for org.springframework.security.web.authentication SavedRequestAwareAuthenticationSuccessHandler setTargetUrlParameter

List of usage examples for org.springframework.security.web.authentication SavedRequestAwareAuthenticationSuccessHandler setTargetUrlParameter

Introduction

In this page you can find the example usage for org.springframework.security.web.authentication SavedRequestAwareAuthenticationSuccessHandler setTargetUrlParameter.

Prototype

public void setTargetUrlParameter(String targetUrlParameter) 

Source Link

Document

If this property is set, the current request will be checked for this a parameter with this name and the value used as the target URL if present.

Usage

From source file:com.iservport.auth.SecurityWebConfig.java

@Bean
public SavedRequestAwareAuthenticationSuccessHandler savedRequestAwareAuthenticationSuccessHandler() {

    SavedRequestAwareAuthenticationSuccessHandler auth = new SavedRequestAwareAuthenticationSuccessHandler();
    auth.setTargetUrlParameter("targetUrl");
    return auth;/*www  . j  av a 2 s  .com*/
}

From source file:de.pksoftware.springstrap.core.config.WebSecurityConfigBase.java

/**
 * Creates the Authentication Success Handler.
 * /*from  w  w  w  .j  av a 2  s  .  c o  m*/
 * @return
 */
@Bean
protected AuthenticationSuccessHandler formLoginSuccessHandlerBean() {
    SavedRequestAwareAuthenticationSuccessHandler successHandler = new AjaxAuthenticationSuccessHandler();

    successHandler.setTargetUrlParameter(SpringstrapConfiguration.DEFAULT_FORM_LOGIN_TARGET_URL_PARAMETER);
    successHandler.setDefaultTargetUrl(SpringstrapConfiguration.DEFAULT_FORM_LOGIN_DEFAULT_TARGET_URL);

    return successHandler;
}