Scope 在 GoogleApiClient 中有什么作用?

What does Scope do in GoogleApiClient?

谁能解释一下 addScope(Scope scope) 方法在 GoogleApiClient.

中的作用
new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(Plus.API)
.addScope(Plus.SCOPE_PLUS_LOGIN)// what really does this?
.build();

Scopes are strings that enable access to particular resources, such as user data.

请参阅doc and scopes summary

范围定义了您需要做的事情的权限。

如果您的应用程序需要从用户 google 驱动器帐户中读取数据,那么您将请求 https://www.googleapis.com/auth/drive.readonly which grants you "read-only access to file metadata and file content" however if you need to be able to upload to google drive you may want to ask for https://www.googleapis.com/auth/drive 授予 "Full, permissive scope to access all of a user's files."

Scope 定义授予应用程序的访问范围。

有问题的范围Plus.login https://www.googleapis.com/auth/plus.login

This is the recommended login scope providing access to social features. This scope implicitly includes the profile scope and also requests that your app be given access to:
* the age range of the authenticated user
* the list of circled people that the user has granted your app access to know
* the methods for reading, writing and deleting app activities (moments) to Google on behalf of the user
In addition, this scope enables cross-platform single sign-on.