Introduction
Models¶
AuthX defines a minimal User model for authentication purposes. It is structured like this:
id(int) – Unique identifier of the user. Defaults to a Int.email(str) – Email of the user. Validated byemail-validator.active(bool) – Whether or not the user is active. If not, login and forgot password requests will be denied. Defaults toTrue.confirmed(bool) – Whether or not the user is verified. Optional but helpful with theverifyrouter logic. Defaults toFalse.permissions(bool) – Whether or not the user is a superuser. Useful to implement administration logic. Defaults toFalse.last_login(datetime) – When the user last logged in. Defaults toNone.created_at(datetime) – When the user was created. Defaults toNone.
There is also a Social User model that is a class of the AuthX User model.
provider(str) – The provider of the social user.sid(str) – The unique identifier of the social user.active(bool) – Whether or not the social user is active. Defaults toTrue.confirmed(bool) – Not like Base Case,but when a user logs in with a social user, the social user is confirmed. Defaults toTrue.
Get Started¶
Start using the defined models in your application, by reading: