13.2.1.2.3. Daplug Token¶
-
class
privacyidea.lib.tokens.daplugtoken.
DaplugTokenClass
(*args, **kwds)[source]¶ daplug token class implementation
-
check_otp
(*args, **kwds)[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
(*args, **kwds)[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
-
classmethod
get_class_info
(*args, **kwds)[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
-
resync
(*args, **kwds)[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
-