【问题标题】:Revoke Rails Doorkeeper Token via POST通过 POST 撤销 Rails Doorkeeper 令牌
【发布时间】:2014-09-09 05:02:18
【问题描述】:

我们知道,如果我们为门卫使用资源所有者密码凭证流,则生成的 POST JSON 参数基于 URL here

{
  "grant_type"    : "password",
  "username"      : "user@example.com",
  "password"      : "sekret",
  "client_id"     : "the_client_id",
  "client_secret" : "the_client_secret"
}

我想通过 POST 到 /oauth/revoke 执行令牌撤销;因此,我需要哪些参数才能通过 JSON 执行 POST?

谢谢!

【问题讨论】:

    标签: ruby-on-rails json doorkeeper


    【解决方案1】:

    好的,我知道了;基本上我需要发送以下内容:

    curl -H "Authorization: Bearer <token>" \
         -F token=<token>\
         -X POST http://livedo-gunter.codio.io:3000/oauth/revoke
    

    这是基于链接here。不过,必须先启用基本授权。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-04-12
      • 2022-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-06
      • 2021-09-24
      相关资源
      最近更新 更多