class privacyidea.lib.tokens.passwordtoken.PasswordTokenClass(aToken)[source]

This Token does use a fixed Password as the OTP value. In addition, the OTP PIN can be used with this token. This Token can be used for a scenario like losttoken

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

This checks the static password

Parameters:anOtpVal – This contains the “OTP” value, which is the static

password :return: result of password check, 0 in case of success, -1 if fail :rtype: int

classmethod get_class_info(*args, **kwds)[source]

returns a subtree of the token definition

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

subsection if key exists or user defined

Return type:

dict or scalar

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

sets the OTP length to the length of the password

Parameters:otplen (int) – This is ignored in this class

This method is called during the initialization process. :param param: parameters from the token init :type param: dict :return: None