简体   繁体   English

为什么我会获得访问令牌? (OAuth2用户)

[英]Why is am I getting an access token? (OAuth2)

I'm using OAuth2. 我正在使用OAuth2。 Since it's a two step verification, shouldn't it give me an error when I try to make the following request? 由于这是一个两步验证,当我尝试提出以下请求时,它不应该给我一个错误吗? I haven't specified the client secret, but it still is sending back an access token that works to use. 我没有指定客户端密钥,但它仍然发回一个可以使用的访问令牌。

http://localhost/oauth/authorize/?response_type=token&client_id=myclientid&redirect_uri=http%3A%2F%2Flocalhost%2Fmyredirecturi.php HTTP://本地主机/ OAuth的/授权/ RESPONSE_TYPE =令牌的client_id = myclientid&REDIRECT_URI = HTTP%3A%2F%2Flocalhost%2Fmyredirecturi.php?

I understand that I first need to ask for a request token, and then trade that in for an access token, but every time I make this request I get back an access token that works..? 我知道我首先需要请求令牌,然后将其交换为访问令牌,但每次我发出此请求时,我都会返回一个有效的访问令牌。 Although, I get an error message if I specify the wrong client id. 虽然,如果我指定了错误的客户端ID,我会收到错误消息。

Looks like I forgot to disable the allowed implicit grant type. 看起来我忘了禁用允许的隐式授权类型。 :) Works now. :)现在工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM