backend.globaleaks.handlers.password_reset

Module Contents

Classes

PasswordResetHandler Handler that implements password reset API

Functions

db_generate_password_reset_token(session, user) Transaction for issuing password reset tokens
generate_password_reset_token_by_user_id(session, tid, user_id) Transaction for generatin ag password reset token for a user identified by a user ID
generate_password_reset_token_by_username_or_mail(session, tid, username_or_email) Transaction for generating a password reset token for a user identified by a username or email
validate_password_reset(session, reset_token, auth_code, recovery_key) Retrieves a user given a password reset validation token
backend.globaleaks.handlers.password_reset.db_generate_password_reset_token(session, user)[source]

Transaction for issuing password reset tokens

Parameters:
  • session – An ORM session
  • user – The user for which issuing a password reset token
backend.globaleaks.handlers.password_reset.generate_password_reset_token_by_user_id(session, tid, user_id)[source]

Transaction for generatin ag password reset token for a user identified by a user ID

Parameters:
  • session – An ORM session
  • tid – The tenant on
  • user_id
Returns:

backend.globaleaks.handlers.password_reset.generate_password_reset_token_by_username_or_mail(session, tid, username_or_email)[source]

Transaction for generating a password reset token for a user identified by a username or email

Parameters:
  • session – An ORM session
  • tid – The tenant ID
  • username_or_email – The username or the email of an user
Returns:

A descriptor of the result

backend.globaleaks.handlers.password_reset.validate_password_reset(session, reset_token, auth_code, recovery_key)[source]

Retrieves a user given a password reset validation token

Parameters:
  • session – An ORM session
  • reset_token – A reset token
  • auth_code – A two factor authentication code (optional)
  • recovery_key – An encryption recovery key (optional)
Returns:

A descriptor describing the result of the operation

class backend.globaleaks.handlers.password_reset.PasswordResetHandler[source]

Bases: globaleaks.handlers.base.BaseHandler

Handler that implements password reset API

check_roles = none[source]
post(self)[source]
put(self)[source]