Skip to main content

AppFactory

@appfire/fuse-auth-coreDocs


@appfire/fuse-auth-core / AppFactory

Class: AppFactory

Factory class for creating instances of App.

Constructors

new AppFactory()

new AppFactory(): AppFactory

Returns

AppFactory

Methods

getAppFromDynamo()

static getAppFromDynamo(key, clientKey): Promise\<undefined | object>

Retrieves the app data from DynamoDB based on the key and clientKey.

Parameters

key: string

The app key.

clientKey: string

The client key.

Returns

Promise\<undefined | object>

A Promise that resolves to the app data.

Defined in

products/AppFactory.ts:166


getInstance()

static getInstance(key, clientKey): Promise\<App>

Retrieves an instance of App based on the key and clientKey.

Parameters

key: string

The app key.

clientKey: string

The client key.

Returns

Promise\<App>

A Promise that resolves to an instance of App.

Throws

Error if the app cannot be found.

Defined in

products/AppFactory.ts:56


getInstanceFromJson()

static getInstanceFromJson(appData): App

Creates an instance of App from JSON data.

Parameters

appData

The JSON data representing the app.

appData.productType: string

Returns

App

An instance of App.

Defined in

products/AppFactory.ts:70