Spring OAuth2授权服务器:如何在用户详细信息服务中获取client_id

时间:2019-01-16 20:19:05

标签: spring-boot spring-security spring-oauth2

鉴于我在内存中的ClientDetailsS​​erviceConfigurer中注册了多个客户端

像这样:

    clients.inMemory()..withClient("fooClientIdPassword").secret("secret")
            .authorizedGrantTypes("password", "client_credentials", "refresh_token").scopes("foo", "read", "write","notifications", "gist")
            .accessTokenValiditySeconds(3600)
            // 1 hour
            .refreshTokenValiditySeconds(2592000)
            // 30 days

            .and().withClient("barClientIdPassword").secret("secret")
            .authorizedGrantTypes("password", "client_credentials", "refresh_token").scopes("bar", "read", "write","notifications", "gist")
            .accessTokenValiditySeconds(3600)
            // 1 hour
            .refreshTokenValiditySeconds(2592000) // 30 days

除了提供的用户名之外,如何在我实施的 UserDetailsS​​ervice 中获取身份验证请求中使用的客户端ID

0 个答案:

没有答案