Skip to main content

Auth

9 endpoints — 5 GET, 4 POST

GET /api/auth

Returns links to the available authentication resource endpoints.

Responses

  • 200 Ok

GET /api/auth/config

Returns the enabled authentication methods available to the UI.

Responses

  • 200 Ok

GET /api/auth/openidconnect

Initiates the OpenID Connect authentication flow (redirects to the OIDC provider).

Responses

  • 204 No content

GET /api/auth/openidconnect/callback

OpenID Connect callback — exchanges the authorization code for a session.

Responses

  • 204 No content

GET /api/auth/profile

Returns the profile of the currently authenticated user.

Responses

  • 200 Ok
  • 401 Unauthorized
  • 404 Not Found

POST /api/auth/create-user

Creates a new user. Requires admin privileges.

Request Body

FieldTypeRequiredDescription
usernamestringYes
passwordstringYes
emailstringYes
gitAccountstringYes
adminbooleanNo

Responses

  • 200 Ok
  • 403 Forbidden
  • 500 Internal Server Error

POST /api/auth/gitAccount

Updates the Git account (username) of a user. Admins may update any user; non-admins may only update their own account.

Request Body

FieldTypeRequiredDescription
usernamestringNo
idstringNo
gitAccountstringYes

Responses

  • 204 No content
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error

POST /api/auth/login

Authenticates the user with a username/password strategy. The appropriate passport strategy is selected dynamically based on configuration.

Responses

  • 200 Ok

POST /api/auth/logout

Logs out the current user and clears the session cookie.

Responses

  • 200 Ok