Function jwks_server::routes::auth
source · pub async fn auth(
db_pool: &State<SqlitePool>,
creds: Json<LoginDTO>,
expired: Option<bool>
) -> Result<String, CryptoError>
Expand description
Authenticates a user and returns a JWT.
This endpoint issues JWTs for authenticated users. Clients can request an expired JWT
for testing purposes by setting the expired
query parameter to true
.
Arguments
creds
- User credentials including a username and password.expired
- An optional query parameter that dictates whether the issued JWT should be expired.