Skip to main content

Module auth

Module auth 

Source
Expand description

Authentication API Endpoints

Handles login, logout, token refresh, and related authentication operations

Structs§

CreateApiKeyResponse
Response returned when an API key is successfully created.
LoginRequest
Login request payload.
LoginResponse
Successful login response.
LoginUserInfo
User information embedded in login and validation responses.
LogoutRequest
Logout request.
ProviderInfo
Summary of an available OAuth login provider.
RefreshRequest
Token refresh request.
RefreshResponse
Token refresh response.
RegisterRequest
User registration request.
RegisterResponse
User registration response.

Functions§

create_api_key
POST /api-keys – create an API key (requires authentication)
list_providers
GET /auth/providers — list available OAuth providers and their authorize URLs.
login
POST /auth/login — authenticate a user with username/password.
logout
POST /auth/logout — revoke access and (optionally) refresh tokens.
refresh_token
POST /auth/refresh — exchange a valid refresh token for a new access token.
register
POST /auth/register — create a new user account.
validate_token
GET /auth/validate Validate current token and return user information