Home Manual Reference Source
private class | source

EmailCredentialsController

Controller class for the Email Credentials model.

Constructor Summary

Public Constructor
public

constructor(connection: Connection)

Member Summary

Private Members
private

Object to use for making a connection to the REST API and Websocket server.

Method Summary

Public Methods
public

Register credentials to the given user.

Public Constructors

public constructor(connection: Connection) source

Params:

NameTypeAttributeDescription
connection Connection

Object to use for making a connection to the REST API and Websocket server.

Private Members

private _connection: Connection source

Object to use for making a connection to the REST API and Websocket server.

Public Methods

public createEmailCredentials(userId: string, emailCredentials: EmailCredentials): Promise<EmailCredentials> source

Register credentials to the given user. Multiple credentials can be registered to one user.

Params:

NameTypeAttributeDescription
userId string

The identifier of the user to register credentials to.

emailCredentials EmailCredentials

The credentials to register to the user.

Return:

Promise<EmailCredentials>

A promise containing the created EmailCredentials.

Throw:

Promise.<Error>

userId parameter of type "string" is required.

Promise.<Error>

emailCredentials parameter of type "EmailCredentials" is required.

Promise.<Error>

If the server returned an error.