目录

AccountAuthParamsHelper

Class Info

public final class AccountAuthParamsHelper

Constructs an AccountAuthParams object.

Public Constructor Summary

Constructor Name

public AccountAuthParamsHelper()

Default constructor.

public AccountAuthParamsHelper(AccountAuthParams params)

Constructs AccountAuthParamsHelper using the existing AccountAuthParams object.

Public Method Summary

Qualifier and Type

Method Name and Description

final AccountAuthParamsHelper

setAuthorizationCode()

Requests a user to authorize an app to obtain the authorization code.

final AccountAuthParamsHelper

setScopeList(List<Scope> scopeList)

Adds a specified scope to authorization parameters to request a user to authorize an app to obtain the user information specified by the scope.

final AccountAuthParamsHelper

setEmail()

Requests a user to authorize an app to obtain the email address.

final AccountAuthParamsHelper

setId()

Requests a user to authorize an app to obtain the UnionID and OpenID.

final AccountAuthParamsHelper

setIdToken()

Requests a user to authorize an app to obtain the ID token.

final AccountAuthParamsHelper

setProfile()

Requests a user to authorize an app to obtain the account information, such as the nickname and profile picture.

final AccountAuthParams

createParams()

Constructs AccountAuthParams using the existing AccountAuthParamsHelper object.

Public Constructors

[h2]AccountAuthParamsHelper()

Constructor

public AccountAuthParamsHelper()

Default constructor.

[h2]AccountAuthParamsHelper(AccountAuthParams params)

Constructor

public AccountAuthParamsHelper(AccountAuthParams params)

Constructs AccountAuthParamsHelper using the existing AccountAuthParams object.

Parameters

Name

Description

params

Existing AccountAuthParams object.

Public Methods

[h2]setAuthorizationCode

Method

public final AccountAuthParamsHelper setAuthorizationCode()

Requests a user to authorize an app to obtain the authorization code. If setAuthorizationCode is used, you do not need to call setIdToken(String clientId). When your app server uses the authorization code to obtain tokens from the Huawei OAuth server, the ID token is contained in the returned result.

Returns

Type

Description

AccountAuthParamsHelper

AccountAuthParamsHelper object.

[h2]setScopeList

Method

public final AccountAuthParamsHelper setScopeList(List<Scope> scopeList)

Adds a specified scope to authorization parameters to request a user to authorize an app to obtain the user information specified by the scope.

Parameters

Name

Description

scopeList

An array of scopes.

Returns

Type

Description

AccountAuthParamsHelper

AccountAuthParamsHelper object.

[h2]setEmail

Method

public final AccountAuthParamsHelper setEmail()

Requests a user to authorize an app to obtain the email address.

Returns

Type

Description

AccountAuthParamsHelper

AccountAuthParamsHelper object.

[h2]setId

Method

public final AccountAuthParamsHelper setId()

Requests a user to authorize an app to obtain the UnionID and OpenID.

Returns

Type

Description

AccountAuthParamsHelper

AccountAuthParamsHelper object.

[h2]setIdToken

Method

public final AccountAuthParamsHelper setIdToken()

Requests a user to authorize an app to obtain the ID token.

Returns

Type

Description

AccountAuthParamsHelper

AccountAuthParamsHelper object.

[h2]setProfile

Method

public final AccountAuthParamsHelper setProfile()

Requests a user to authorize an app to obtain the account information, such as the nickname and profile picture.

Returns

Type

Description

AccountAuthParamsHelper

AccountAuthParamsHelper object.

[h2]createParams

Method

public final AccountAuthParams createParams()

Constructs AccountAuthParams using the existing AccountAuthParamsHelper object.

Returns

Type

Description

AccountAuthParams

AccountAuthParams object.