如何从MySQL获取客户端详细信息,而不是在OAuth2中使用inMemory()

时间:2020-03-10 07:39:39

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

我正在使用oauth2使用客户端凭据授予类型来验证客户端。这里实现了AuthorizationServerConfigurerAdapter并覆盖了如下所示在内存中使用的ClientDetailsS​​erviceConfigurer配置方法

@Override
    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
        clients.inMemory()
                .withClient(clientId)
                .secret(clientSecret).authorizedGrantTypes(grantType)
                .scopes(scope).accessTokenValiditySeconds(Integer.parseInt(tokenValidity));
    }

我想知道如何从数据库而不是inMemory中加载客户端详细信息。

任何回应都是有意义的

0 个答案:

没有答案