6.1.1.2.1.6. linotp.controllers.gettoken module

gettoken controller - to retrieve OTP values

class linotp.controllers.gettoken.GettokenController(*args, **kw)[source]

Bases: linotp.lib.base.BaseController

The linotp.controllers are the implementation of the web-API to talk to the LinOTP server. The ValidateController is used to validate the username with its given OTP value.

The Tagespasswort Token uses this controller to retrieve the current OTP value of the Token and be able to set it in the application The functions of the GettokenController are invoked like this

The functions are described below in more detail.

getmultiotp()[source]

This function is used to retrieve multiple otp values for a given user or a given serial If the user has more than one token, the list of the tokens is returend.

method:
gettoken/getmultiotp
arguments:
serial - the serial number of the token count - number of otp values to return curTime - used ONLY for internal testing: datetime.datetime object
returns:
JSON response
getotp()[source]

This function is used to retrieve the current otp value for a given user or a given serial If the user has more than one token, the list of the tokens is returend.

method:
gettoken/getotp
arguments:
user - username / loginname realm - additional realm to match the user to a useridresolver serial - the serial number of the token curTime - used ONY for internal testing: datetime.datetime object
returns:
JSON response