16.2.1.15.22. Vasco Token

class privacyidea.lib.tokens.vascotoken.VascoTokenClass(db_token)[source]

Token class for VASCO Digipass tokens. Relies on vendor-specific shared library, whose location needs to be set in the PI_VASCO_LIBRARY config option.

VASCO Tokens can be read from a CSV file which is structured as follows:

<serial1>,<hexlify(blob1)>,vasco
<serial2>,<hexlify(blob2)>,vasco
...

whereas blobX is the 248-byte blob holding the token information. Consequently, hexlify(blobX) is a 496-character hex string.

The CSV file can be imported by using the “Import Tokens” feature of the Web UI, where “OATH CSV” needs to be chosen as the file type.

constructor - create a token class object with its db token binding

Parameters:

aToken – the db bound token

check_otp(otpval, counter=None, window=None, options=None)[source]

This checks the OTP value, AFTER the upper level did the checkPIN

In the base class we do not know, how to calculate the OTP value. So we return -1. In case of success, we should return >=0, the counter

Parameters:
  • otpval – the OTP value

  • counter (int) – The counter for counter based otp values

  • window – a counter window

  • options (dict) – additional token specific options

Returns:

counter of the matching OTP value.

Return type:

int

export_token() dict[source]

Export for this token is not supported.

static get_class_info(key=None, ret='all')[source]
Parameters:
  • key (string) – subsection identifier

  • ret (user defined) – default return value, if nothing is found

Returns:

subsection if key exists or user defined

Return type:

dict or string

static get_class_prefix()[source]

return the token type prefix

static get_class_type()[source]

return the class type identifier

import_token(token_information: dict)[source]

Import for this token is not supported.

update(param, reset_failcount=True)[source]

update - process initialization parameters

Parameters:

param (dict) – dict of initialization parameters

Returns:

nothing