java - Get j_username before having authentication completed -


i constructed filter runs before "springsecurityfilterchain" , filter needs j_username dofilter method. unfortuntaly it's impossible use principal object , username throught getname() before end of successful authentication.
there other way j_username in first filter?

override

 public class exusernamepasswordauthenticationfilter extends usernamepasswordauthenticationfilter {   @override  public authentication attemptauthentication(httpservletrequest request, httpservletresponse response) throws authenticationexception {           final string username = request.getparameter("j_username");            // delegate logic           return super.attemptauthentication(request, response);    }  } 

in security config < http />

<bean id="exusernamepasswordauthfilter" class="..." />  <custom-filter ref="exusernamepasswordauthfilter" position="form_login_filter"/> 

http://docs.spring.io/spring-security/site/docs/3.1.x/reference/springsecurity-single.html#ns-custom-filters


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -