Function jwks_server::auth::create_user

source ·
pub async fn create_user(
    db_pool: &SqlitePool,
    username: &str,
    password: &str
) -> Result<User, Error>
Expand description

Creates a new user in the database with the provided username and password hash.

Arguments

  • db_pool - A connection pool to the SQLite database.
  • username - The username of the new user.
  • password - The plain text password for the new user.

Returns

Returns a Result which is Ok with the created User on success, or an Err with an sqlx::Error on failure.