【问题标题】:OAuth2 response with client_id instead refresh_token使用 client_id 而不是 refresh_token 的 OAuth2 响应
【发布时间】:2014-03-29 18:38:47
【问题描述】:

我在 php 中有两个 oauth2 客户端示例,一个有效,另一个无效,它返回错误:

([error] => 未经授权的 [error_description] => 在 SecurityContext 中找不到 Authentication 对象)。

我的问题是,oauth2 服务器什么时候应该返回一个带有 client_id 的访问令牌响应,什么时候应该返回一个带有 refresh_token 的响应?

我的工作要求是:

string(130) "{"access_token":"b91f15ed-436f-470d-8d9e-bf245c5373ae","token_type":"bearer","expires_in":25209,"scope":"read","client_id":"tonr"}" 

我的不工作请求是:

string(126) "{"access_token": "eaa3c66ae1", "token_type": "bearer", "expires_in": 31536000, "refresh_token": "69f9c2cb29", "scope": "user"}"

既然它只是改变了client_id 和refresh_token,它应该什么时候出现,什么时候应该出现另一个?

【问题讨论】:

    标签: oauth-2.0


    【解决方案1】:

    刷新令牌由您用来获取access_token 的第三方应用程序管理。据说你不能直接请求刷新令牌。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-05-27
      • 2018-01-22
      • 1970-01-01
      • 2017-07-18
      • 1970-01-01
      • 2013-07-27
      • 1970-01-01
      相关资源
      最近更新 更多