java - How to set user detail in session atttribute after login in spring secuiry xml -
i implement spring security in project. want put custom object(domain object) in session @ time of login, can check user details httpservletrequest object in controller.
please me, how it? spring security file :
<http auto-config="true" use-expressions="true"> <intercept-url pattern="/login/**" access="permitall" /> <intercept-url pattern="/forgotpassword/**" access="permitall" /> <intercept-url pattern="/css/**" access="permitall" /> <intercept-url pattern="/js/**" access="permitall" /> <intercept-url pattern="/images/**" access="permitall" /> <intercept-url pattern="/**" access="hasrole('role_user')" /> <!-- access denied page --> <access-denied-handler error-page="/403" /> <form-login login-page="/login" default-target-url="/listsensordata" authentication-failure-url="/login?login_error=1" username-parameter="username" password-parameter="password" login-processing-url="/loginssuser" ></form-login> <logout logout-success-url="/login" invalidate-session="true" logout-url="/logout" /> </http> <authentication-manager alias="authenticationmanager"> <authentication-provider user-service-ref="ssmsuserdetservice" > </authentication-provider> </authentication-manager>
Comments
Post a Comment