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