File

src/lib/myScript/input/generic/challengeRequestWSMessage.ts

Description

WebSocket recognition hmac challenge message

Extends

AbstractWSMessage

Constructor

constructor(obj: any)

Creates an instance of ChallengeRequestWSMessage.

Parameters :
  • obj : Object

    Recognition WebSocket message

Methods

getChallenge
getChallenge()

Get the challenge

Returns: string
setChallenge
setChallenge(challenge: string)

Set the challenge

Parameters :
  • challenge : String
Returns: void
getApplicationKey
getApplicationKey()

Get the application key

Returns: string
setApplicationKey
setApplicationKey(applicationKey: string)

Set the application key

Parameters :
  • applicationKey : String
Returns: void
getHmacSignature
getHmacSignature()

Get HMAC signature

Returns: string
setHmacSignature
setHmacSignature(hmac: string)

Set HMAC signature

Parameters :
  • hmac : String
Returns: void

Properties

applicationKey
applicationKey: string
challenge
challenge: string
hmac
hmac: string
import { AbstractWSMessage } from '../../common/abstractWSMessage';

/**
 * WebSocket recognition hmac challenge message
 * 
 * @export
 * @class ChallengeRequestWSMessage
 * @extends {AbstractWSMessage}
 */
export class ChallengeRequestWSMessage extends AbstractWSMessage {
	challenge: string;
	applicationKey: string;
	hmac: string;

	/**
	 * Creates an instance of ChallengeRequestWSMessage.
	 * @param {Object} [obj] Recognition WebSocket message
	 * 
	 * @memberof ChallengeRequestWSMessage
	 */
	constructor(obj?) {
		super(obj);
		this.type = 'hmac';
	}

	/**
		* Get the challenge
		*
		* @method getChallenge
		* @returns {String}
		*/
	getChallenge(): string {
		return this.challenge;
	};

	/**
	 * Set the challenge
	 *
	 * @method setChallenge
	 * @param {String} challenge
	 */
	setChallenge(challenge: string) {
		this.challenge = challenge;
	};

	/**
	 * Get the application key
	 *
	 * @method getApplicationKey
	 * @returns {String}
	 */
	getApplicationKey(): string {
		return this.applicationKey;
	};

	/**
	 * Set the application key
	 *
	 * @method setApplicationKey
	 * @param {String} applicationKey
	 */
	setApplicationKey(applicationKey: string) {
		this.applicationKey = applicationKey;
	};

	/**
	 * Get HMAC signature
	 *
	 * @method getHmacSignature
	 * @returns {String}
	 */
	getHmacSignature(): string {
		return this.hmac;
	};

	/**
	 * Set HMAC signature
	 *
	 * @method setHmacSignature
	 * @param {String} hmac
	 */
	setHmacSignature(hmac: string) {
		this.hmac = hmac;
	};
}

results matching ""

    No results matching ""