{
  "openapi": "3.0.4",
  "info": {
    "title": "Auth API",
    "description": "API for authentication and user management",
    "version": "v1"
  },
  "paths": {
    "/Auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Authenticate a user and return access and refresh tokens via HTTP-only cookies.",
        "requestBody": {
          "description": "The login credentials.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/login-internal": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Authenticate a user and return access and refresh tokens in the response body (for server-to-server use).",
        "requestBody": {
          "description": "The login credentials.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LoginInternalResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginInternalResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginInternalResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/refresh-token": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Refresh an expired access token using a valid refresh token. New tokens are set as HTTP-only cookies.",
        "requestBody": {
          "description": "The refresh token to exchange.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/refresh-token-internal": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Refresh an expired access token and return new tokens in the response body (for server-to-server use).",
        "requestBody": {
          "description": "The refresh token to exchange.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LoginInternalResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginInternalResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginInternalResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/validate-jti": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Validate that a JWT access token has not been revoked by checking its JTI claim against the server's cache.",
        "requestBody": {
          "description": "The user ID and JTI to validate.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateAuthRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateAuthRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateAuthRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/logout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Log out a user by revoking their refresh token and invalidating their cached JTI.",
        "requestBody": {
          "description": "The user ID and refresh token to revoke.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/update-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Change the authenticated user's password. Requires a valid Bearer token and the current password for verification.\nAll existing sessions are revoked after a successful password change and new tokens are issued.",
        "requestBody": {
          "description": "The current and new passwords.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/forgot-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Initiate the forgot-password flow by generating a temporary password and emailing it to the user's address on file.\nAlways returns 200 OK regardless of whether the user exists (to prevent user enumeration).\nWhen a `ResetUrl` is provided, the email link appends a `data` query parameter containing a\nbase64-encoded JSON object with `token` and `identifier` fields for UI prefill.",
        "requestBody": {
          "description": "The user identifier and optional reset URL for the email link.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatePasswordResetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatePasswordResetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatePasswordResetRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/consume-password-reset": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Consume a temporary password issued during the forgot-password flow and set a new password.\nAll existing sessions are revoked on success. Always returns 200 OK to prevent information leakage.",
        "requestBody": {
          "description": "The user identifier, temporary password, and new password.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumePasswordResetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumePasswordResetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumePasswordResetRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Auth/reset-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Admin-initiated password reset. Generates a temporary password for the target user, revokes all sessions,\nand optionally sends a reset email. Requires a valid admin Bearer token.\nWhen an email is sent, the reset link appends a `data` query parameter containing a\nbase64-encoded JSON object with `token` and `identifier` fields for UI prefill.",
        "requestBody": {
          "description": "The target user ID and optional email settings.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResetPasswordResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetPasswordResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetPasswordResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Client": {
      "post": {
        "tags": [
          "Client"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/User/register": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Register a brand-new user from a client",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterUserDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterUserDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterUserDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/User/register-internal": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Register a brand-new user from a client",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterUserDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterUserDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterUserDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterUserInternalResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterUserInternalResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterUserInternalResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/User/deactivate": {
      "post": {
        "tags": [
          "User"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeactivateUserDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeactivateUserDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeactivateUserDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/User": {
      "patch": {
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/User/update-claims": {
      "post": {
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/User/loginhistory": {
      "get": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "userEmail",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/User/reset-password": {
      "post": {
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ConsumePasswordResetRequest": {
        "required": [
          "newPassword",
          "temporaryPassword"
        ],
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "The user's email address. At least one of Auth.API.Dtos.Auth.ConsumePasswordResetRequest.EmailAddress, Auth.API.Dtos.Auth.ConsumePasswordResetRequest.Username, or Auth.API.Dtos.Auth.ConsumePasswordResetRequest.Identifier must be provided.",
            "nullable": true,
            "example": "user@example.com"
          },
          "username": {
            "type": "string",
            "description": "The user's username. At least one of Auth.API.Dtos.Auth.ConsumePasswordResetRequest.EmailAddress, Auth.API.Dtos.Auth.ConsumePasswordResetRequest.Username, or Auth.API.Dtos.Auth.ConsumePasswordResetRequest.Identifier must be provided.",
            "nullable": true,
            "example": "johndoe"
          },
          "identifier": {
            "type": "string",
            "description": "A general-purpose identifier (email or username). Takes precedence over Auth.API.Dtos.Auth.ConsumePasswordResetRequest.EmailAddress and Auth.API.Dtos.Auth.ConsumePasswordResetRequest.Username when provided.",
            "nullable": true
          },
          "temporaryPassword": {
            "type": "string",
            "description": "The temporary password that was issued during the forgot-password flow.",
            "nullable": true
          },
          "newPassword": {
            "type": "string",
            "description": "The new password the user wants to set for their account.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for consuming a password-reset token and setting a new password.\nThe user must provide the temporary password issued during the forgot-password flow along with their new password."
      },
      "DeactivateUserDto": {
        "required": [
          "deactivateAt",
          "deactivatedBy",
          "userEmailAddress"
        ],
        "type": "object",
        "properties": {
          "userEmailAddress": {
            "type": "string",
            "description": "The email address of the user to deactivate.",
            "nullable": true,
            "example": "user@example.com"
          },
          "deactivateAt": {
            "type": "string",
            "description": "The date and time (UTC) at which the deactivation should take effect.",
            "format": "date-time"
          },
          "deactivatedBy": {
            "type": "string",
            "description": "The identifier of the person or system performing the deactivation.",
            "nullable": true
          },
          "deactivatedReason": {
            "type": "string",
            "description": "An optional reason for the deactivation.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for deactivating a user account."
      },
      "InitiatePasswordResetRequest": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "The user's email address. At least one of Auth.API.Dtos.Auth.InitiatePasswordResetRequest.EmailAddress, Auth.API.Dtos.Auth.InitiatePasswordResetRequest.Username, or Auth.API.Dtos.Auth.InitiatePasswordResetRequest.Identifier must be provided.",
            "nullable": true,
            "example": "user@example.com"
          },
          "username": {
            "type": "string",
            "description": "The user's username. At least one of Auth.API.Dtos.Auth.InitiatePasswordResetRequest.EmailAddress, Auth.API.Dtos.Auth.InitiatePasswordResetRequest.Username, or Auth.API.Dtos.Auth.InitiatePasswordResetRequest.Identifier must be provided.",
            "nullable": true,
            "example": "johndoe"
          },
          "identifier": {
            "type": "string",
            "description": "A general-purpose identifier (email or username). Takes precedence over Auth.API.Dtos.Auth.InitiatePasswordResetRequest.EmailAddress and Auth.API.Dtos.Auth.InitiatePasswordResetRequest.Username when provided.",
            "nullable": true
          },
          "resetUrl": {
            "type": "string",
            "description": "The base URL for the password-reset page. A `data` query parameter is appended containing a base64-encoded JSON object\nwith `token` (the temporary password) and `identifier` (the user's identifier) fields.\nExample decoded payload: `{\"token\":\"...\",\"identifier\":\"user@example.com\"}`",
            "nullable": true,
            "example": "https://app.example.com/reset-password"
          }
        },
        "additionalProperties": false,
        "description": "Request body for initiating a forgot-password flow. Only the user identifier is required;\na temporary password will be generated and emailed to the user's address on file."
      },
      "LoginInternalResponseDto": {
        "required": [
          "jwtExpiresSeconds",
          "jwtToken",
          "refreshExpiresSeconds",
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "jwtToken": {
            "type": "string",
            "description": "The signed JWT access token.",
            "nullable": true
          },
          "jwtExpiresSeconds": {
            "type": "integer",
            "description": "The number of seconds until the JWT access token expires.",
            "format": "int32"
          },
          "refreshToken": {
            "type": "string",
            "description": "The refresh token that can be used to obtain a new access token.",
            "nullable": true
          },
          "refreshExpiresSeconds": {
            "type": "integer",
            "description": "The number of seconds until the refresh token expires.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Response returned by the internal login endpoint containing authentication tokens and their lifetimes."
      },
      "LoginRequest": {
        "required": [
          "password"
        ],
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "The user's email address. Used when Auth.API.Dtos.Auth.LoginRequest.Identifier is not provided.",
            "nullable": true,
            "example": "user@example.com"
          },
          "username": {
            "type": "string",
            "description": "The user's username. Used when Auth.API.Dtos.Auth.LoginRequest.Identifier is not provided.",
            "nullable": true,
            "example": "johndoe"
          },
          "identifier": {
            "type": "string",
            "description": "A general-purpose identifier that can be either an email address or username. Takes precedence over Auth.API.Dtos.Auth.LoginRequest.EmailAddress and Auth.API.Dtos.Auth.LoginRequest.Username when provided.",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "The user's password.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for authenticating a user. Supply either Auth.API.Dtos.Auth.LoginRequest.Identifier, or at least one of Auth.API.Dtos.Auth.LoginRequest.EmailAddress / Auth.API.Dtos.Auth.LoginRequest.Username."
      },
      "LoginResponseDto": {
        "type": "object",
        "properties": {
          "requiresPasswordReset": {
            "type": "boolean",
            "description": "Indicates whether the user is required to reset their password before accessing the application."
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RefreshTokenRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "description": "The refresh token previously issued during login or a prior token refresh.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for refreshing an expired access token using a valid refresh token."
      },
      "RegisterUserDto": {
        "required": [
          "password"
        ],
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "description": "The user's email address. At least one of Auth.API.Dtos.Users.RegisterUserDto.EmailAddress or Auth.API.Dtos.Users.RegisterUserDto.Username must be provided.",
            "nullable": true,
            "example": "user@example.com"
          },
          "username": {
            "type": "string",
            "description": "The user's chosen username. At least one of Auth.API.Dtos.Users.RegisterUserDto.EmailAddress or Auth.API.Dtos.Users.RegisterUserDto.Username must be provided.",
            "nullable": true,
            "example": "johndoe"
          },
          "password": {
            "type": "string",
            "description": "The user's password. If Auth.API.Dtos.Users.RegisterUserDto.RequirePasswordReset is true, this value is discarded and replaced with a temporary password.",
            "nullable": true
          },
          "roleId": {
            "enum": [
              0,
              1,
              2,
              3
            ],
            "type": "integer",
            "description": "The role to assign to the new user. Defaults to Guest.",
            "format": "int32"
          },
          "sendEmail": {
            "type": "boolean",
            "description": "When true, a welcome email is sent to the user's email address after registration. Requires Auth.API.Dtos.Users.RegisterUserDto.EmailAddress to be set. Defaults to false."
          },
          "requirePasswordReset": {
            "type": "boolean",
            "description": "When true, the provided password is replaced with a temporary password and a password-reset token is created,\nforcing the user to reset their password on first login. If Auth.API.Dtos.Users.RegisterUserDto.SendEmail is also true and a Auth.API.Dtos.Users.RegisterUserDto.ResetUrl is provided,\nthe welcome email will include a link to set their password. Defaults to false."
          },
          "resetUrl": {
            "type": "string",
            "description": "The base URL for the password-reset page. Used to build the reset link included in the welcome email\nwhen Auth.API.Dtos.Users.RegisterUserDto.RequirePasswordReset and Auth.API.Dtos.Users.RegisterUserDto.SendEmail are both true. The temporary token is appended as a query parameter.",
            "nullable": true,
            "example": "https://app.example.com/reset-password"
          }
        },
        "additionalProperties": false,
        "description": "Request body for registering a new user account."
      },
      "RegisterUserInternalResponseDto": {
        "required": [
          "jwtExpiresSeconds",
          "jwtToken",
          "refreshExpiresSeconds",
          "refreshToken",
          "userId"
        ],
        "type": "object",
        "properties": {
          "jwtToken": {
            "type": "string",
            "description": "The signed JWT access token for the newly registered user.",
            "nullable": true
          },
          "jwtExpiresSeconds": {
            "type": "integer",
            "description": "The number of seconds until the JWT access token expires.",
            "format": "int32"
          },
          "refreshToken": {
            "type": "string",
            "description": "The refresh token that can be used to obtain a new access token.",
            "nullable": true
          },
          "refreshExpiresSeconds": {
            "type": "integer",
            "description": "The number of seconds until the refresh token expires.",
            "format": "int32"
          },
          "userId": {
            "type": "string",
            "description": "The unique identifier of the newly created user.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Response returned by the internal registration endpoint containing authentication tokens and the new user's identifier."
      },
      "ResetPasswordRequest": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The unique identifier of the user whose password should be reset.",
            "format": "uuid"
          },
          "sendEmail": {
            "type": "boolean",
            "description": "When true, a password-reset email containing the temporary password is sent to the target user's email address. Requires Auth.API.Dtos.Auth.ResetPasswordRequest.ResetUrl to be set. Defaults to false."
          },
          "resetUrl": {
            "type": "string",
            "description": "The base URL for the password-reset page. Used to build the reset link included in the email when Auth.API.Dtos.Auth.ResetPasswordRequest.SendEmail is true.\nA `data` query parameter is appended containing a base64-encoded JSON object\nwith `token` (the temporary password) and `identifier` (the user's email) fields.\nExample decoded payload: `{\"token\":\"...\",\"identifier\":\"user@example.com\"}`",
            "nullable": true,
            "example": "https://app.example.com/reset-password"
          }
        },
        "additionalProperties": false,
        "description": "Request body for an admin-initiated password reset. Generates a temporary password for the target user and creates a password-reset token that blocks login until consumed."
      },
      "ResetPasswordResponseDto": {
        "required": [
          "encodedData",
          "expiresAtUtc",
          "expiresInSeconds",
          "temporaryPassword"
        ],
        "type": "object",
        "properties": {
          "temporaryPassword": {
            "type": "string",
            "description": "The temporary password the user must supply (along with a new password) to the forgot-password endpoint.",
            "nullable": true
          },
          "expiresAtUtc": {
            "type": "string",
            "description": "The UTC date and time at which the temporary password expires.",
            "format": "date-time"
          },
          "expiresInSeconds": {
            "type": "integer",
            "description": "The number of seconds until the temporary password expires.",
            "format": "int32"
          },
          "encodedData": {
            "type": "string",
            "description": "Base64-encoded JSON object containing `token` and `identifier` fields,\nsuitable for use as a `data` query parameter in a reset URL.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response returned after an admin-initiated password reset, containing the temporary credentials and their lifetime."
      },
      "RevokeTokenRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "description": "The refresh token to revoke.",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "description": "The unique identifier of the user being logged out.",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Request body for revoking a user's tokens during logout."
      },
      "UpdatePasswordRequest": {
        "required": [
          "currentPassword",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "currentPassword": {
            "type": "string",
            "description": "The user's current password, used to verify their identity before allowing the change.",
            "nullable": true
          },
          "newPassword": {
            "type": "string",
            "description": "The new password the user wants to set.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for an authenticated user to change their own password. Requires a valid Bearer token."
      },
      "ValidateAuthRequest": {
        "required": [
          "jti"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The unique identifier of the user whose token is being validated.",
            "format": "uuid"
          },
          "jti": {
            "type": "string",
            "description": "The JTI (JWT ID) claim value from the access token to validate.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for validating that a JWT access token has not been revoked, by checking its JTI claim against the server's cache."
      }
    }
  }
}