我使用FriendsOfSymfony/FOSRestBundle,FriendsOfSymfony/FOSUserBundle和FriendsOfSymfony/FOSOAuthServerBundle处理symfony项目 .
在安全部分,我无法使用刷新令牌获取新的访问令牌 . 我只能获取访问令牌 . 我已经按照一些教程,当我尝试获取新令牌时出现此错误:
{
"error": "unauthorized_client",
"error_description": "Le type de subvention est non autorisee pour cette client_id"
}
网址是:http://myproject.local/oauth/v2/token
参数是:
-
grant_type:refresh_token
-
client_id:client_id
-
client_secret:client_secret
-
refresh_token:refresh_token
我错过了任何配置吗?或者我使用了错误的网址或错误的参数?有什么帮助吗?
1 回答
该错误表示不允许您的客户端使用
refresh_token
grant类型 . 您需要做的是将此授权类型添加到您的客户端(代码未测试):