Function jwks_server::auth::find_user_by_username
source · pub async fn find_user_by_username(
db_pool: &SqlitePool,
username: &str
) -> Result<Option<User>, Error>
Expand description
Finds a user by username in the database.
Arguments
db_pool
- A connection pool to the SQLite database.username
- The username of the user to find.
Returns
Returns a Result
which is Ok
with Some(User)
if the user is found,
Ok
with None
if the user is not found,
or an Err
with an sqlx::Error
on failure.