openapi: 3.1.0 info: title: OpenAPI definition version: v0 servers: - url: http://localhost description: Generated server url tags: - name: Authentication description: Public Endpoints für Login und Registrierung - name: Admin IAM description: User-Verwaltung und Freigabe-Workflow paths: /api/auth/register: post: tags: - Authentication summary: Registriert einen neuen User inkl. Zählpunkt description: Setzt den User auf Status PENDING und triggert den asynchronen EDA-Check. operationId: register requestBody: content: application/json: schema: $ref: "#/components/schemas/RegistrationRequest" required: true responses: "200": description: OK /api/auth/login: post: tags: - Authentication summary: User Login description: "Gibt einen JWT zurück. Schlägt fehl, wenn Status noch PENDING\ \ ist." operationId: login requestBody: content: application/json: schema: $ref: "#/components/schemas/LoginRequest" required: true responses: "200": description: OK content: '*/*': schema: $ref: "#/components/schemas/AuthResponse" /api/admin/users/{userId}/reject: post: tags: - Admin IAM summary: User ablehnen description: Lehnt den Antrag ab (z.B. weil Zählpunkt nicht ins Netz passt). operationId: rejectUser parameters: - name: userId in: path required: true schema: type: string format: uuid responses: "200": description: OK /api/admin/users/{userId}/approve: post: tags: - Admin IAM summary: User freigeben description: "Setzt enabled=true, status=APPROVED und triggert die finale EDA-Anmeldung." operationId: approveUser parameters: - name: userId in: path required: true schema: type: string format: uuid responses: "200": description: OK /api/admin/users/pending: get: tags: - Admin IAM summary: Lädt alle wartenden User description: Zeigt User im Status PENDING inkl. der Ergebnisse des EDA-Netz-Checks. operationId: getPendingUsers responses: "200": description: OK content: '*/*': schema: type: array items: $ref: "#/components/schemas/UserProfileResponse" components: schemas: RegistrationRequest: type: object description: Payload für die Registrierung eines neuen Users properties: firstName: type: string example: Max minLength: 1 lastName: type: string example: Mustermann minLength: 1 email: type: string format: email example: max@example.com minLength: 1 password: type: string example: SecurePass123! maxLength: 2147483647 minLength: 8 atNumber: type: string example: AT0010000000000000000000001234567 minLength: 1 pattern: "^AT[0-9]{31}$" required: - atNumber - email - firstName - lastName - password LoginRequest: type: object description: Payload für den Login properties: email: type: string format: email example: max@example.com minLength: 1 password: type: string example: SecurePass123! minLength: 1 required: - email - password AuthResponse: type: object description: Antwort nach erfolgreichem Login properties: token: type: string description: JWT Bearer Token status: type: string description: Status des Users example: PENDING role: type: string description: Rolle des Users example: USER UserProfileResponse: type: object description: Repräsentation eines Users für das Admin-Dashboard properties: id: type: string format: uuid firstName: type: string lastName: type: string email: type: string status: type: string primaryAtNumber: type: string