@acceleratxr/core_sdk / AuthOAuthService

Class: AuthOAuthService#

Hierarchy#

Index#

Constructors#

Properties#

Methods#

Constructors#

constructor#

+ new AuthOAuthService(apiClient: ApiClient, config: Configuration): AuthOAuthService

Overrides ServiceBase.constructor

Defined in src/services/AuthOAuthService.ts:11

Parameters:#

Name

Type

apiClient

ApiClient

config

Configuration

Returns: AuthOAuthService

Properties#

apiClient#

Protected apiClient: ApiClient

Inherited from ServiceBase.apiClient

Defined in src/ServiceBase.ts:14

The API Client used when making requests to the API backend server.


config#

Protected config: Configuration

Inherited from ServiceBase.config

Defined in src/ServiceBase.ts:19

The SDK configuration to use.


uuid#

Static uuid: string = “49107964-f3c1-4d7c-ade9-ca3c499d72eb”

Defined in src/services/AuthOAuthService.ts:17

Methods#

authenticate#

authenticate(id: string, code: string, redirectUri?: undefined | string, verifier?: undefined | string): Promise<AuthToken | undefined>

Defined in src/services/AuthOAuthService.ts:64

Authenticates the user using the specified OAuth provider and authorization code. Optionally, include the redirect URI that was used to generate the authorization code.

Parameters:#

Name

Type

id

string

code

string

redirectUri?

undefined | string

verifier?

undefined | string

Returns: Promise<AuthToken | undefined>


connect#

connect(id: string, code: string, verifier?: undefined | string, redirectUri?: undefined | string, force?: undefined | false | true): Promise<void>

Defined in src/services/AuthOAuthService.ts:81

Connects an existing user to a third-party OAuth provider using the specified id and authorization code. Optionally, include the redirect URI that was used to generate the authorization code.

Parameters:#

Name

Type

id

string

code

string

verifier?

undefined | string

redirectUri?

undefined | string

force?

undefined | false | true

Returns: Promise<void>


getAuthorizationURI#

getAuthorizationURI(id: string, state?: undefined | string, redirectUri?: undefined | string, scope?: undefined | string): Promise<string>

Defined in src/services/AuthOAuthService.ts:37

Requests the authorization URI for the specified OAuth provider. Optionally, set the redirect URI that will be used to redirect the completed request.

Parameters:#

Name

Type

id

string

state?

undefined | string

redirectUri?

undefined | string

scope?

undefined | string

Returns: Promise<string>


getUrl#

PrivategetUrl(id: string): string

Defined in src/services/AuthOAuthService.ts:24

Returns the URL to the authentication method with the given identifier.

Parameters:#

Name

Type

Description

id

string

The identifier of the authentication method.

Returns: string

The URL of the authentication method.