Searching...

Authentication

Endpoints for user authentication including login, logout, and token refresh operations.

post /auth/login

Login to the Nebularis API

Authenticate a user and return an access token.

username string required

The user's username

password string required

The user's password

Responses

Successfully logged in

Response body Headers
token string

The access token for authenticated requests

This response does not contain any headers

Invalid credentials

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "username": "johndoe",
  "password": "strongpassword123"
}

Response examples

Successfully logged in

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
post /auth/logout

Logout from the Nebularis API

Revoke the current user's access token.

Responses

Successfully logged out

Response body Headers

This response is empty

This response does not contain any headers

Response examples

post /auth/refresh

Refresh authentication token

Refresh the access token using a refresh token.

token string required

The refresh token

Responses

Successfully refreshed token

Response body Headers
token string

The new access token

This response does not contain any headers

Invalid token

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Response examples

Successfully refreshed token

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}