We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
ReferencesAccount KitHarmonyOS-Javacom.huawei.hms.accountsdk.support.account.requestClass SummaryScope

Scope

  • Supported devices: phones, tablets, HUAWEI Vision products, telematics devices, and smart watches
  • Supported operating system: HarmonyOS 2.0 or later
Expand

Class Info

public class Scope

Describes the OAuth 2.0-based authorization request. User authorization is required for the sake of privacy protection. The authorization request is shown to users in a dialog box.

Public Constructor Summary

Expand

Constructor Name

public Scope(String uri)

Creates a scope using a specified URI.

Public Method Summary

Expand

Qualifier and Type

Method Name and Description

String

getScopeUri()

Obtains the URI of a scope.

Public Constructors

Scope

Expand

Constructor Name

public Scope(String uri)

Creates a scope using a specified URI.

Parameters

Expand

Type

Description

String

URI of a scope.

The options are as follows:

  • profile: basic information of a HUAWEI ID, such as the profile picture and nickname.
  • email: email address of a HUAWEI ID.
  • openid: OpenID of a HUAWEI ID.
  • https://www.huawei.com/auth/games: special scope for game apps.

Public Methods

getScopeUri

Expand

Method

public String getScopeUri()

Obtains the URI of a scope.

Returns

Expand

Type

Description

String

Scope URI.

Search in References
Enter a keyword.