Spring boot 如何在oauth2服务器上运行时获取客户端应用程序id-spring引导

Spring boot 如何在oauth2服务器上运行时获取客户端应用程序id-spring引导,spring-boot,spring-security,oauth-2.0,spring-security-oauth2,spring-oauth2,Spring Boot,Spring Security,Oauth 2.0,Spring Security Oauth2,Spring Oauth2,我不熟悉Spring引导并实现oauth服务器,我想在其中使用oauth2授权授予类型流。我有多个clinet应用程序,每个客户端应用程序都有自己的ldap组来验证用户。我想知道在用户身份验证期间如何在运行时获取客户端应用程序id @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { String username = aut

我不熟悉Spring引导并实现oauth服务器,我想在其中使用
oauth2授权授予类型流
。我有多个clinet应用程序,每个客户端应用程序都有自己的
ldap组
来验证用户。我想知道在用户身份验证期间如何在运行时获取客户端应用程序id

@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");
    }     
}