apicrud.auth.totp_func

totp_func

created 5-apr-2021 by richb@instantlinux.net

Functions

login(username, otp[, redis_conn])

Log in with TOTP; a prior login must have occured and set up a session with the account_id and pendingotp auth.

apicrud.auth.totp_func.login(username, otp, redis_conn=None)

Log in with TOTP; a prior login must have occured and set up a session with the account_id and pendingotp auth. If successful, this passes a sqlalchemy account record back for further processing by SessionAuth._login_accepted.

Parameters
  • username (str) – username

  • otp (str) – 6 or 8-digit one-type password

  • redis_conn (obj) – connection to redis

Returns

dict with error message, http status (200 if OK), account object

Return type

tuple