spring oauth2只返回access_token而不是refresh_token

时间:2015-10-18 18:16:48

标签: java spring oauth-2.0 spring-security-oauth2

我用boot和oauth2开始了一个新项目。我将client_credentials设置为grant_type with refresh_token但是只得到access_token而不是刷新。

这是我的clientDetailsS​​erviceConfigurer:

.withClient("XXXXX")
            .authorizedGrantTypes("client_credentials", "refresh_token")
            .authorities(ROLE_PRODUCER)
            .scopes(SCOPE_WRITE)
            .resourceIds(RESOURCE_ID)
            .secret("WSEWEWEWEW")
            .accessTokenValiditySeconds(7200);

服务器的响应:

{"access_token":"XXXX","token_type":"bearer","expires_in":6901,"scope":"write"}

0 个答案:

没有答案