I am new to Spring boot and implementing oauth server where I want to use oauth2 authorization grant type flow
. I have multiple clinet apps and each client app has its own ldap group
to authenticate the user. I wonder how I can get client app id at runtime during user authentication?
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
String username = authentication.getName();
String password = authentication.getCredentials().toString();
if(userName != null && password != null) {
String clientId = //CLIENT_ID
//Get client Ldap group using clientId from db and autheticate the user
} else {
throw new BadCredentialsException("Invalid Client Credentials");
}
}