【发布时间】:2019-01-09 06:42:48
【问题描述】:
我从事 Drupal8 项目并创建了 Rest API,一切正常,直到我想在尝试获取令牌时添加 Oauth2我收到了无效的授权类型错误。
这是错误代码:
{
"error": "invalid_grant",
"message": "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.",
"hint": "Check the configuration to see if the grant is enabled."
}
这是我调用的网址:
http://myserver/oauth/token?grant_type=password&client_id=6db9da8d-b831-4381-b279-381bc5a57e90&scope&username=webmasterrest&password=webmasterrest&client_secret=$S$EamACyfemGWic74kmkwUvphMmr9FL132KC297mI1GEkTKhyBJyAo
我添加了一个客户端,但我无法向该客户端添加授权类型“密码”,请问有什么帮助吗?
【问题讨论】: