linotp.tokens.tagespassworttoken module

This file contains the dynamic tagespasswort token implementation: - TagespasswortTokenClass (DPW)

class linotp.tokens.tagespassworttoken.TagespasswortTokenClass(aToken)

Bases: TokenClass

The Tagespasswort is a one time password that is calculated based on the day input.

  • the initial seed is appended with the day/month/year

  • some md5 and truncation will produce an 6 digits password

  • via getotp the set of next day passwords could be retrieved

checkOtp(anOtpVal, counter, window, options=None)

This checks the OTP value, AFTER the upper level did the checkPIN

return:

counter of the matching OTP value.

classmethod getClassInfo(key=None, ret='all')

getClassInfo - 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

s.o.

classmethod getClassPrefix()
classmethod getClassType()
getOtp(curTime=None)

The default token does not support getting the otp value will return something like:

1, pin, otpval, combined

a negative value is a failure.

get_multi_otp(count=0, epoch_start=0, epoch_end=0, curTime=None)

This returns a dictionary of multiple future OTP values of the Tagespasswort token

parameter

count - how many otp values should be returned epoch_start - time based tokens: start when epoch_end - time based tokens: stop when

return

True/False error text OTP dictionary

reset()

reset the token failcount value

update(param)
class linotp.tokens.tagespassworttoken.dpwOtp(secObj, digits=6)

Bases: object

using a context manager pattern to make sure that the secret is finally removed at the ending