java - Spring Custom Authentication Manager -
i using spring security authenticating users. have implemented custom authentication manager credentials , name blank in authentication manager
here security xml
<security:http auto-config="false" entry-point-ref="authenticationentrypoint"> <security:custom-filter position="concurrent_session_filter" ref="concurrencyfilter" /> <security:custom-filter ref="authenticationfilter" position="form_login_filter" /> <!-- <security:custom-filter after="concurrent_session_filter" ref="securefilter" /> --> <security:session-management session-authentication-strategy-ref="sas" /> </security:http> <bean id="authenticationfilter" class="org.springframework.security.web.authentication.usernamepasswordauthenticationfilter" p:authenticationmanager-ref="ahcauthenticationmanager" p:authenticationfailurehandler-ref="customauthenticationfailurehandler" p:authenticationsuccesshandler-ref="customauthenticationsuccesshandler" p:sessionauthenticationstrategy-ref="sas">
here authentication manager code
public class ahcauthenticationmanager implements authenticationmanager { private userinfoservice userinfoservice; public ahcauthenticationmanager(userinfoservice userinfoservice) { this.userinfoservice = userinfoservice; } public authentication authenticate(authentication arg) throws authenticationexception { system.out.println(arg.getname()); if (userinfoservice.authenticateuser(arg.getname(), arg .getcredentials().tostring())) { return new usernamepasswordauthenticationtoken(arg.getprincipal(), arg.getcredentials()); } return null; }
}
the sysout in manager code return empty using jsf client side , in managed bean inside request can see parameters in request parametermap idea might going wrong ?
thanks
Comments
Post a Comment