Module mini_rust_auth::auth

source ·
Expand description

A set of base functions that are used to do all the underlying work of auth. This includes user and session management.

Structs§

  • Basic information about a user. Note that realm can be a arbitrary string and you can use to figure out a group a user belongs to like "admin".
  • Information about a session. Each session is associated with a user_name.

Enums§

Functions§

  • add_user
  • Provides a connection to a postgres server. This requires DATABASE_URL to be set.
  • 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.
  • invalidate_session
  • validate_session
  • validate_user