I applied Spring Security in my application. I used the default implementation, i.e. Configured it with my own parameters (DataSource, Secured Areas, etc.), but I did not write any custom implementation.
Now I want to get more data from the user, that is, in the same table as the username and password, for example, company name, identifier, etc. However, I do not want to use this information for login.
I am not sure how to do this. From what I read, this is related to UserDetailsService. However, it seems that writing a custom UserDetailsService would be necessary if I wanted to use this information during login, and this is not what I want. I just want to use this information inside the application after user login.
Is it really related to UserDetailsServer? Is this the only file I need to modify?
All the examples that I found in the user-defined UserDetailsService just used a username and password, so I cannot figure out where the new data will go.
Thanks!
java spring security login
João daniel
source share