mOTP Token

class privacyidea.lib.tokens.motptoken.MotpTokenClass(*args, **kwds)[source]
check_otp(*args, **kwds)[source]

validate the token otp against a given otpvalue

  • anOtpVal (string) – the to be verified otpvalue
  • 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

the counter state or -1

Return type:


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

returns a subtree of the token definition Is used by lib.token.get_token_info

  • key (string) – subsection identifier
  • ret (user defined) – default return value, if nothing is found

subsection if key exists or user defined

:rtype : dict or string

classmethod get_class_prefix()[source]
classmethod get_class_type()[source]
get_init_detail(*args, **kwds)[source]

to complete the token normalisation, the response of the initialization should be build by the token specific method, the getInitDetails

update(*args, **kwds)[source]

update - process initialization parameters

Parameters:param (dict) – dict of initialization parameters