Spring Security has a UserDetailsService with method
public UserDetails loadUserByUsername(String username)
Usually we need to create a UserDetailsServiceImpl that implements this interface and provides an implementation for the above method.
In my application, the username will not be unique. This may be the same for different organizations. It will be unique with the organization. Therefore, I need to find user data by user name and organization.
In this case, the above method will not work. I am trying to create a method that will take two parameters, that is, the username and the name of the organization and get the user data.
The login form will contain three usernames, organization name and password. This authentication part with three i / p parameters works correctly.
But I can not call my custom method call.
Please, help.
source share