Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ricardomb-tech/auth-service/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint returns the full profile of the currently authenticated user. It is the primary way for a client to inspect the account associated with a given access token — for example, to determine the user’s roles for frontend route guarding, to display their email, or to check which social login providers they have connected. The endpoint requires a valid JWT access token in the Authorization header and returns a 401 for any request that is missing, malformed, or expired.

Endpoint

Method: GET
Path: /api/v1/users/me
Auth: Required — Authorization: Bearer <access_token>

Request

No request body. Authentication is provided exclusively via the Authorization header.
curl -H 'Authorization: Bearer <access_token>' \
  http://localhost:8080/api/v1/users/me

Response — 200 OK

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "email": "user@example.com",
  "roles": ["USER"],
  "status": "ACTIVE",
  "federatedIdentities": ["google"],
  "createdAt": "2024-01-15T10:30:00Z"
}
id
string
The account’s unique identifier, a UUID v4 formatted as a string (e.g. "a1b2c3d4-e5f6-7890-abcd-ef1234567890"). Stable across all login methods and token rotations.
email
string
The verified email address associated with the account.
roles
array of strings
The set of roles granted to the account. Possible values are "USER" and "ADMIN". All regular accounts receive ["USER"] at creation. Example with both roles: ["USER", "ADMIN"].
status
string
The current lifecycle state of the account. One of:
ValueMeaning
PENDING_VERIFICATIONThe account was registered but the email address has not yet been verified. The account cannot log in with credentials until verified.
ACTIVEThe account is fully operational. Login with credentials and federated login are both allowed.
LOCKEDThe account has been temporarily locked (e.g. due to future brute-force protection). Login is refused until the lock is lifted.
DISABLEDThe account has been administratively disabled. Login is refused.
federatedIdentities
array of strings
The list of OAuth2 providers linked to this account, represented as lowercase provider names. An account may have zero or more linked identities. Possible values are "google" and "github". Example: ["google", "github"] for an account linked to both providers.
createdAt
string
The ISO 8601 UTC timestamp of when the account was first created (e.g. "2024-01-15T10:30:00Z").

Error responses

StatusWhen
401 UnauthorizedThe Authorization header is missing, the token is malformed, the token signature is invalid, or the token has expired.
401 error body:
{
  "type": "about:blank",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication required.",
  "instance": "/api/v1/users/me"
}

Full example

Request:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...' \
  http://localhost:8080/api/v1/users/me
Response:
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "email": "user@example.com",
  "roles": ["USER"],
  "status": "ACTIVE",
  "federatedIdentities": ["google"],
  "createdAt": "2024-01-15T10:30:00Z"
}
Response for an account with both roles and multiple providers:
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f01234567891",
  "email": "admin@example.com",
  "roles": ["USER", "ADMIN"],
  "status": "ACTIVE",
  "federatedIdentities": ["google", "github"],
  "createdAt": "2023-06-01T08:00:00Z"
}

Build docs developers (and LLMs) love