The use case is every existing account requires to create an nickname after authentication. If a nickname is not chosen after authentication, he/she will not be login to the site.
Could anyone suggest how to implement nickname creation after login using spring security?
I was able to setup all the spring security for username/password login. After the success authentication, I'm not sure if I should throw an authentication-failure-exception to redirect to the nickname creation page but then I lose the username and password information once redirected.
Please help.Code:<!-- HTTP security configurations --> <http auto-config="true" use-expressions="true"> <form-login login-processing-url="/static/j_spring_security_check" login-page="/login" authentication-failure-url="/login?login_error=t"/> <logout logout-url="/static/j_spring_security_logout"/> <!-- Configure these elements to secure URIs in your application --> <intercept-url pattern="/choice/**" access="hasRole('ROLE_ADMIN')"/> <intercept-url pattern="/member/**" access="isAuthenticated()" /> <intercept-url pattern="/resources/**" access="permitAll" /> <intercept-url pattern="/static/**" access="permitAll" /> <intercept-url pattern="/**" access="permitAll" /> </http> <!-- Configure Authentication mechanism --> <authentication-manager alias="authenticationManager"> <!-- SHA-256 values can be produced using 'echo -n your_desired_password | sha256sum' (using normal *nix environments) --> <authentication-provider> <password-encoder hash="sha-256"/> <user-service> <user name="admin" password="8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918" authorities="ROLE_ADMIN"/> <user name="user" password="04f8996da763b7a969b1028ee3007569eaf3a635486ddab211d512c85b9df8fb" authorities="ROLE_USER"/> </user-service> </authentication-provider> </authentication-manager>
![]()


