Jump to content

Please help me understand the user management


hallodrischulze

Recommended Posts

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...