Trait iron_login::User [] [src]

pub trait User: Send + Sync + Sized {
    fn from_user_id(request: &mut Request, user_id: &str) -> Option<Self>;
    fn get_user_id(&self) -> String;

    fn get_login(request: &mut Request) -> Login<Self> { ... }
}

Trait repesenting an authenticated user

Required Methods

fn from_user_id(request: &mut Request, user_id: &str) -> Option<Self>

Create a User instance from a user id

fn get_user_id(&self) -> String

Get the user_id associated with this User

Provided Methods

fn get_login(request: &mut Request) -> Login<Self>

Create a Login<Self> instance (no need to override)

Implementors