Users
Authentication and user management.
Login
Authenticate with username and password. Sets access_token and refresh_token as HTTP-only cookies.
Request body
username string required
Username
password string required
Password
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"username": "admin",
"name": "Admin",
"email": "admin@example.com",
"isAdmin": true
}Logout
Invalidate the current session and clear auth cookies.
Refresh Token
Refresh the access token using the refresh token cookie.
Response
{
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"expiresIn": 900
}Current User
Get the currently authenticated user's profile.
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"username": "admin",
"name": "Admin",
"email": "admin@example.com",
"isAdmin": true
}Change Password
Change the current user's password.
Request body
oldPassword string required
Current password
newPassword string required
New password
List Users
List all user accounts.
Response
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"username": "admin",
"name": "Admin",
"email": "admin@example.com",
"isAdmin": true
},
{
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"username": "jdoe",
"name": "Jane Doe",
"email": "jane@example.com",
"isAdmin": false
}
]Create User
Create a new user account.
Request body
username string required
Username
password string required
Password
name string required
Full name
email string required
Email address
Response
{ "status": "created" }Get User
Get a specific user by ID.
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"username": "jdoe",
"name": "Jane Doe",
"email": "jane@example.com",
"isAdmin": false
}Update User
Update a user's details. Only provided fields are changed.
Request body
username string
New username
name string
New name
email string
New email
newPassword string
New password
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"username": "jdoe",
"name": "Jane Doe",
"email": "jane-updated@example.com",
"isAdmin": false
}