【发布时间】:2017-02-02 23:46:05
【问题描述】:
我在请求刷新令牌时遇到问题,它不断返回未经授权的 401 错误。我不知道我是否缺少在我发出请求时传递的参数。
我为刷新令牌添加了门卫配置。
use_refresh_token
这是请求的详细信息:
{{root_url}}/oauth/token
{"refresh_token"=>"034a74c085219fb8297fd8ef9b59f080918f"
"format"=>:json,
"controller"=>"/oauth/tokens",
"action"=>"create",
"grant_type"=>"refresh_token",
"client_id"=>"<client_id>",
"client_secret"=> "<client_secret>"}
错误描述:
{:error=>:invalid_grant,
:error_description=>
"The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."}
顺便说一句,我所有的 api 请求身份验证都没有失败,只是这个刷新令牌。我想知道我在请求参数中缺少什么。
【问题讨论】:
标签: ruby-on-rails ruby api doorkeeper