hallodrischulze Posted July 21, 2010 Share Posted July 21, 2010 hi everybody, i have implemented a single sing on solution for the jasperserver. I just want to use spring-security for authorization purpose only not for authentication and it works well, but i don't understand why. I wrote a custom UserDetailsService which just returns an User Object. Heres my code: public class UserRepository implements UserDetailsService{ public User loadUserByUsername(String userName) throws UsernameNotFoundException, DataAccessException { User user = new User(userName, "noPass", true, true, true, true, new GrantedAuthority[]{new GrantedAuthorityImpl("ROLE_USER")}); return user; }}When a user is logged in for the first time, he is automatically created in the database and can be managed by the administrator. Can someone tell me wehre this exactly happens? Which class creates a new user in the database and where the authorization happens?So the role that i assign to the user in the UserDetailsService cannot be changed anymore, is that right? Thank You Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now