Home Manual Reference Source
import {Authentication} from 'zetapush-js/src/authentication/handshake.js'
public class | source

Authentication

Factory to create handshake

Static Method Summary

Static Public Methods
public static

create(parameters: {authType: string, deploymentId: string, login: string, password: string}): TokenHandshake | CredentialsHandshake

public static

delegating(parameters: {deploymentId: string, token: string}): TokenHandshake

public static

simple(parameters: {deploymentId: string, login: string, password: string}): CredentialsHandshake

public static

weak(parameters: {deploymentId: string, token: string}): TokenHandshake

Static Public Methods

public static create(parameters: {authType: string, deploymentId: string, login: string, password: string}): TokenHandshake | CredentialsHandshake source

Params:

NameTypeAttributeDescription
parameters {authType: string, deploymentId: string, login: string, password: string}

Return:

TokenHandshake | CredentialsHandshake

public static delegating(parameters: {deploymentId: string, token: string}): TokenHandshake source

Params:

NameTypeAttributeDescription
parameters {deploymentId: string, token: string}

Return:

TokenHandshake

Example:

// Explicit deploymentId
// Authentication provide optional deployment id, according to the following convention `${ServiceType.toLowerCase()_0}`
Authentication.delegating({
  deploymentId: '<YOUR-DELEGATING-AUTHENTICATION-DEPLOYMENT-ID>',
  token: null
})

public static simple(parameters: {deploymentId: string, login: string, password: string}): CredentialsHandshake source

Params:

NameTypeAttributeDescription
parameters {deploymentId: string, login: string, password: string}

Return:

CredentialsHandshake

Example:

// Explicit deploymentId
// Authentication provide optional deployment id, according to the following convention `${ServiceType.toLowerCase()_0}`
Authentication.delegating({
  deploymentId: '<YOUR-SIMPLE-AUTHENTICATION-DEPLOYMENT-ID>',
  login: <USER-LOGIN>,
  password: '<USER-PASSWORD>'
})

public static weak(parameters: {deploymentId: string, token: string}): TokenHandshake source

Params:

NameTypeAttributeDescription
parameters {deploymentId: string, token: string}

Return:

TokenHandshake

Example:

// Explicit deploymentId
// Authentication provide optional deployment id, according to the following convention `${ServiceType.toLowerCase()_0}`
Authentication.delegating({
  deploymentId: '<YOUR-WEAK-AUTHENTICATION-DEPLOYMENT-ID>',
  token: null
})