pub async fn generate_session(
credentials: &Credentials,
pool: &Pool<Postgres>,
secs_after_creation_to_die: i64,
) -> Result<Session, SessionGeneratedErr>
Expand description
Will create a session for the provided user. The users information is stored
in credentials
. Once the session is generated it will be stored in the
DB. The validity and state of the session can be changed later with
validate_session
and invalidate_session
.