Trait actix_plus_auth::Account[][src]

pub trait Account: Serialize + DeserializeOwned + Debug + 'static {
    fn email(&self) -> &str;
}

A struct that implements this trait represents the data that is stored with each account in the authentication system. The only mandatory data to st ore in an account is the email that the account is associated with. The password should not be stored here. Your account object’s data and the password, taken together, are usually one row in a SQL database (although other database types can be used as this library does not interact with the database), where the email is the primary key. Note that this data is viewable to the user as it is stored in an unencrypted (but signed) json web token!

Required methods

fn email(&self) -> &str[src]

Gets the email associated with this account.

Loading content...

Implementors

Loading content...