Home Reference Source Repository
import {Ingresse} from 'ingresse-sdk/src/auth/ingresse.js'
public class | source

Ingresse

Extends:

Authentication → Ingresse

Static Method Summary

Static Public Methods
public static

Authentication type e.g.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

authData: {"apiKey": *, "userToken": *}

Method Summary

Public Methods
public

Get Ingresse ApiKey

public
public
public

Get formatted authentication settings

public

Get authentication token value

public

setApiKey(apiKey: string)

Set Ingresse ApiKey

public

setAuth(timestamp: string, signature: string, apiKey: string): boolean

Set Auth settings to 'Others Companies' validations

public

setPrivateKey(privateKey: string)

public

setPublicKey(apiKey: *)

public

setToken(token: string)

Set authentication token value

Inherited Summary

From class Authentication
public get

Get authentication data

public set

authData(data: object | string): *

Set authentication data

Static Public Methods

public static type(): string source

Authentication type e.g. Jwt, BasicAuth, Ingresse

Return:

string

Public Constructors

public constructor() source

Public Members

public authData: {"apiKey": *, "userToken": *} source

Set authentication data

Override:

Authentication#authData

Public Methods

public getApiKey(): string source

Get Ingresse ApiKey

Return:

string

Example:

ingresse.api.auth.getApiKey();

public getPrivateKey(): string source

Return:

string

Example:

ingresse.api.auth.getPrivateKey();

public getPublicKey(): * source

Return:

*

public getSettings(): object source

Get formatted authentication settings

Return:

object

public getToken(): string source

Get authentication token value

Return:

string

Example:

const userToken = ingresse.api.auth.getToken();

public setApiKey(apiKey: string) source

Set Ingresse ApiKey

Params:

NameTypeAttributeDescription
apiKey string

Ingresse ApiKey

Example:

ingresse.api.auth.setApiKey('12345678901234');

public setAuth(timestamp: string, signature: string, apiKey: string): boolean source

Set Auth settings to 'Others Companies' validations

Params:

NameTypeAttributeDescription
timestamp string
signature string
apiKey string

(optional)

Return:

boolean

Example:

ingresse.api.auth.setAuth('2018-03-14T16:10:13Z', 'signature-generated-before', 'your-app-api-key--optional');

public setPrivateKey(privateKey: string) source

Params:

NameTypeAttributeDescription
privateKey string

Ingresse PrivateKey

Example:

ingresse.api.auth.setPrivateKey('12345678901234');

public setPublicKey(apiKey: *) source

Params:

NameTypeAttributeDescription
apiKey *

public setToken(token: string) source

Set authentication token value

Params:

NameTypeAttributeDescription
token string

Token value

Example:

ingresse.api.auth.setToken('12345-31t4v1d431t4v1d4d3c40....');