apicrud.auth.totp

totp

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

Classes

AuthTOTP()

TOTP for Session Authorization

class apicrud.auth.totp.AuthTOTP

TOTP for Session Authorization

Functions for generating, registering and validating Time-based One Time Password tokens

register(body)

Register a new account: create related records in database and send confirmation token to new user

TODO caller still has to invoke account_add function to generate record in accounts table

Parameters
  • identity (str) – account’s primary identity, usually an email

  • username (str) – account’s username

  • name (str) – name

  • picture (url) – URL of an avatar / photo

  • template (str) – template for message (confirming new user)

Returns

the Confirmation.request dict and http response

Return type

tuple