【发布时间】:2016-11-23 21:16:16
【问题描述】:
我是一名学生,从事 PHP laravel 项目以使用 OAuth2.0 保护 API。 当我将访问令牌放在我的 URL 中时,我正在使用 Postman 测试我的 API:
URL/?access_token=... 一切正常。
现在想用Header来传递access_token,我试过了:
Key: access_token with Value:(token)
Key: Authorization with Value:(token)
Key:带值的授权:(Bearer + the token)
这些似乎都不起作用。有谁知道我做错了什么或我错过了什么?当我搜索正确答案时,我发现 Key: Authorization with Value:(Bearer + the token) 需要正常工作。
提前谢谢!
【问题讨论】:
标签: laravel header access-token postman oauth2