timApp.user.verification package#

Submodules#

timApp.user.verification.routes module#

timApp.user.verification.routes.do_verify(verify_type: str, verify_token: str, verify: bool) flask.wrappers.Response[source]#
timApp.user.verification.routes.get_verification_data(verify_type: str, verify_token: str) tuple[timApp.user.verification.verification.Verification | None, str | None][source]#
timApp.user.verification.routes.show_verify_page(verify_type: str, verify_token: str) str[source]#

timApp.user.verification.verification module#

class timApp.user.verification.verification.ContactAddVerification(**kwargs)[source]#

Bases: timApp.user.verification.verification.Verification

approve() None[source]#
contact: timApp.user.usercontact.UserContact | None#

Contact to verify.

contact_id#
deny() None[source]#
reacted_at#

When the user reacted to verification request.

requested_at#

When a verification has been added to db, pending sending to a user.

property return_url: str | None#
to_json() dict[source]#
token#

Verification token used for action verification

type: timApp.user.verification.verification.VerificationType#

The type of verification, see VerificationType class for details.

user: timApp.user.user.User#

User that can react to verification request.

user_id#

User that can react to verification request.

class timApp.user.verification.verification.SetPrimaryContactVerification(**kwargs)[source]#

Bases: timApp.user.verification.verification.ContactAddVerification

approve() None[source]#
contact: timApp.user.usercontact.UserContact | None#

Contact to verify.

contact_id#
deny() None[source]#
reacted_at#

When the user reacted to verification request.

requested_at#

When a verification has been added to db, pending sending to a user.

token#

Verification token used for action verification

type: timApp.user.verification.verification.VerificationType#

The type of verification, see VerificationType class for details.

user: timApp.user.user.User#

User that can react to verification request.

user_id#

User that can react to verification request.

class timApp.user.verification.verification.Verification(**kwargs)[source]#

Bases: sqlalchemy.ext.declarative.api.Model

For various pending verifications, such as message list joining and contact information ownership verification.

approve() None[source]#
deny() None[source]#
reacted_at#

When the user reacted to verification request.

requested_at#

When a verification has been added to db, pending sending to a user.

property return_url: str | None#
to_json() dict[source]#
token#

Verification token used for action verification

type: timApp.user.verification.verification.VerificationType#

The type of verification, see VerificationType class for details.

user: timApp.user.user.User#

User that can react to verification request.

user_id#

User that can react to verification request.

class timApp.user.verification.verification.VerificationType(value)[source]#

Bases: enum.Enum

Type of verification, used to direct the proper verification action afterwards.

CONTACT_OWNERSHIP = 'contact'#

Add a new contact to the user.

LIST_JOIN = 'list'#

Add user to the message list.

SET_PRIMARY_CONTACT = 'set_primary_contact'#

Set a primary contact.

static get_verification_types() set[str][source]#
static parse(t: str) Optional[timApp.user.verification.verification.VerificationType][source]#
timApp.user.verification.verification.get_verify_message_template(verify_type: timApp.user.verification.verification.VerificationType) tuple[str, str][source]#
timApp.user.verification.verification.request_verification(verification: timApp.user.verification.verification.Verification, email: Optional[str] = None) None[source]#
timApp.user.verification.verification.request_verification_impl(verification: timApp.user.verification.verification.Verification, message_title: str, message_body: str, email: Optional[str] = None) None[source]#
timApp.user.verification.verification.resend_verification(verification: timApp.user.verification.verification.Verification, email: Optional[str] = None) None[source]#
timApp.user.verification.verification.send_verification_impl(verification: timApp.user.verification.verification.Verification, message_title: str, message_body: str, email: Optional[str] = None) None[source]#

Module contents#