import ErrorHelpers from '../error_handling/ErrorHelpers' ; import { IExpectedSelfIssued , ITokenValidator , TokenType , ValidationError } from '../index' ; import { IValidationResponse } from '../input_validation/IValidationResponse' ; import ValidationQueue from '../input_validation/ValidationQueue' ; import ValidationQueueItem from '../input_validation/ValidationQueueItem' ; import IValidatorOptions from '../options/IValidatorOptions' ; import ValidationOptions from '../options/ValidationOptions' ; const errorCode = ( error ) => ErrorHelpers . errorCode ( 'VCSDKSITV' , error ) ; /**
 * Class to validate a token
 */ export default class SelfIssuedTokenValidator implements ITokenValidator { param validatorOption param expected constructor ( private validatorOption , private expected ) { } param queue param queueItem public async validate ( _queue , _queueItem ) { const options = new ValidationOptions ( this . validatorOption , TokenType . selfIssued ) ; const validationResponse = { result : true , status : 200 } ; return validationResponse ; } param validationResponse param queue public getTokens ( _validationResponse , _queue ) { throw new ValidationError ( `Not implemented` , errorCode ( 1 ) ) ; } /**
     * Gets the type of token to validate
     */ public get isType ( ) : TokenType { return TokenType . selfIssued ; } }