14.2.1.2.3. Daplug Token

class privacyidea.lib.tokens.daplugtoken.DaplugTokenClass(a_token)[source]

daplug token class implementation

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

checkOtp - validate the token otp against a given otpvalue

Parameters:
  • anOtpVal (string, format: efekeiebekeh) – the otpvalue to be verified
  • counter (int) – the counter state, that should be verified
  • window (int) – the counter +window, which should be checked
  • options (dict) – the dict, which could contain token specific info
Returns:

the counter state or -1

Return type:

int

check_otp_exist(otp, window=10)[source]

checks if the given OTP value is/are values of this very token. This is used to autoassign and to determine the serial number of a token.

Parameters:
  • otp (string) – the to be verified otp value
  • window (int) – the lookahead window for the counter
Returns:

counter or -1 if otp does not exist

Return type:

int

static get_class_info(key=None, ret='all')[source]

returns a subtree of the token definition

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]
static get_class_type()[source]
get_multi_otp(count=0, epoch_start=0, epoch_end=0, curTime=None, timestamp=None)[source]
get_otp(current_time=None)[source]
resync(otp1, otp2, options=None)[source]

resync the token based on two otp values - external method to do the resync of the token

Parameters:
  • otp1 (string) – the first otp value
  • otp2 (string) – the second otp value
  • options (dict or None) – optional token specific parameters
Returns:

counter or -1 if otp does not exist

Return type:

int

split_pin_pass(passw, user=None, options=None)[source]