src/lib/myScript/input/generic/challengeRequestWSMessage.ts
WebSocket recognition hmac challenge message
constructor(obj: any)
|
Creates an instance of ChallengeRequestWSMessage.
Parameters :
|
getChallenge |
getChallenge()
|
Get the challenge
Returns:
string
|
setChallenge |
setChallenge(challenge: string)
|
Set the challenge
Parameters :
Returns:
void
|
getApplicationKey |
getApplicationKey()
|
Get the application key
Returns:
string
|
setApplicationKey |
setApplicationKey(applicationKey: string)
|
Set the application key
Parameters :
Returns:
void
|
getHmacSignature |
getHmacSignature()
|
Get HMAC signature
Returns:
string
|
setHmacSignature |
setHmacSignature(hmac: string)
|
Set HMAC signature
Parameters :
Returns:
void
|
applicationKey |
applicationKey: |
challenge |
challenge: |
hmac |
hmac: |
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;
};
}