User

The User class is a child class of the SetConfig class. The User class has a constructor that takes in a userID and a config object. The User class has a bunch of methods that make API calls to the Identity Server.

Constructor

new User(userID, config)

The constructor function is a special function that is called when an object is created from a class

Parameters:
NameTypeDescription
userIDstring

The user ID of the user you want to get the profile of.

configConfig

Config - This is the configuration object that is passed to the constructor of the base class.

Extends

  • SetConfig

Methods

createAPIKey(payload) → {Output-CreateAPIKey}

It creates an api key for the user.

Parameters:
NameTypeDescription
payloadInput-CreateAPIKeyForUser

Input-CreateAPIKeyForUser

Returns:

The response from the API.

Type: 
Output-CreateAPIKey

createApplication(payload) → {Output-CreateApplication}

It creates an application for the user.

Parameters:
NameTypeDescription
payloadInput-CreateApplication

Input-CreateApplication

Returns:

The response from the API.

Type: 
Output-CreateApplication

createGateway(payload) → {Output-CreateGateway}

It creates a gateway for the user.

Parameters:
NameTypeDescription
payloadInput-CreateGateway

CreateGateway

Returns:

The response from the API. ----> CreateGateway

Type: 
Output-CreateGateway

getAPIKeyInfo(payload) → {Output-GetAPIKeyInfo}

It returns the information of the api key that has been created by the user.

Parameters:
NameTypeDescription
payloadInput-GetAPIKeyInfo

Input-GetAPIKeyInfo

Returns:

The response from the API.

Type: 
Output-GetAPIKeyInfo

getAPIKeyList(payloadopt) → {Output-GetAPIKeyList}

It returns the list of api keys that have been created by the user.

Parameters:
NameTypeAttributesDescription
payloadInput-GetAPIKeyList<optional>

Input-GetAPIKeyList

Returns:

The response from the API.

Type: 
Output-GetAPIKeyList

getApplicationList(payloadopt) → {Output-GetApplicationList}

It returns the list of applications that have been created by the user.

Parameters:
NameTypeAttributesDescription
payloadInput-GetApplicationList<optional>

Input-GetApplicationList

Returns:

The response from the API.

Type: 
Output-GetApplicationList

getGatewayList(payloadopt) → {Output-GetGatewayList}

It returns the list of gateways that have been created by the user.

Parameters:
NameTypeAttributesDescription
payloadInput-GetGatewayList<optional>

Input-GetGatewayList

Returns:

The response from the API. ----> GetGatewayList

Type: 
Output-GetGatewayList

updateAPIKey(payload) → {Output-UpdateAPIKey}

It returns the information of the api key that has been created by the user.

Parameters:
NameTypeDescription
payloadInput-UpdateAPIKeyOfUser

Input-UpdateAPIKeyOfUser

Returns:

The response from the API.

Type: 
Output-UpdateAPIKey