Google OAuth2:不要求任何信息(空范围) [英] Google OAuth2: Asking for no information (empty scope)

查看:79
本文介绍了Google OAuth2:不要求任何信息(空范围)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用OAuth2连接到Google帐户时是否可以不要求任何信息?

我试图传递一个空的scope参数,但是它不起作用(通常是Google错误页面).

I tried to pass an empty scope parameter but It won't work (Usual google error page).

此外,没有scope可用参数的列表...暂时使用scope=email.

Also, there is no list of the available parameters for scope...For now I use scope=email.

我终于找到了范围参数列表: https://developers.google.com /+/api/oauth

A list of scope parameters I finally found: https://developers.google.com/+/api/oauth

推荐答案

对不起,您不能.

OAuth 2.0授权框架说:

如果客户端在请求授权时忽略了scope参数,则授权服务器务必使用预定义的默认值处理请求,或者使请求失败 指示无效的范围.

If the client omits the scope parameter when requesting authorization, the authorization server MUST either process the request using a pre-defined default value or fail the request indicating an invalid scope.

然后Google的实现选择第二个.

And Google's implementation chooses the later one.

这篇关于Google OAuth2:不要求任何信息(空范围)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆