Authentication API¶
This document provides information about the authentication endpoints of the FastAPI RBAC API.
Authentication Endpoints¶
POST /api/v1/auth/login¶
Log in a user with email and password.
Request Body:
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
POST /api/v1/auth/refresh¶
Refresh an access token using a refresh token.
Request Body:
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
POST /api/v1/auth/logout¶
Log out a user by invalidating their tokens.
Request Headers:
Response: