目录

Scope

Class Info

public class Scope

描述一个OAuth 2.0的请求授权,对用户安全有影响,当请求授权时,会产生一个授权对话框。

Public Constructor Summary

Constructor Name

public Scope(String uri)

使用指定URI创建一个新的Scope。

Public Method Summary

Qualifier and Type

Method Name and Description

String

getScopeUri()

获取当前Scope对应的授权URI。

Public Constructors

[h2]Scope

Constructor Name

public Scope(String uri)

使用指定URI创建一个新的Scope。

Parameters

Type

Description

String

授权资源的URI字符串。

scopeUri样例描述:

  • profile:华为帐号的基本信息,例如头像、昵称等
  • email:华为帐号的email
  • openid:华为帐号的OpenID
  • https://www.huawei.com/auth/games:游戏的专用Scope

Public Methods

[h2]getScopeUri

Method

public String getScopeUri()

获取当前Scope对应的授权URI。

Returns

Type

Description

String

返回当前Scope对应的授权URI。