Authenticate an admin user.

POST /api/v1/authenticate

Authenticate via admin user and generate a JWT token.

application/json

Body Required

  • username string Required

    The username of the admin user.

  • password string Required

    The password of the admin user.

Responses

  • 401

    Invalid credentials.

  • 404 */*

    Not Found

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 500 */*

    Internal Server Error

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 400 */*

    Bad Request

    Hide response attribute Show response attribute object
    • error object
      Hide error attributes Show error attributes object
      • code string
      • message string
      • target string
      • details array[object]
        Hide details attributes Show details attributes object
        • code string
        • message string
        • target string
  • 200 */*

    JWT token generated.

    Hide response attributes Show response attributes object
    • jwtToken string
    • refreshToken string
POST /api/v1/authenticate
curl \
 --request POST 'http://localhost:8080/api/v1/authenticate' \
 --header "Content-Type: application/json" \
 --data '{"username":"admin","password":"password"}'
Request examples
{
  "username": "admin",
  "password": "password"
}
Response examples (404)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (500)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (400)
{
  "error": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string"
      }
    ]
  }
}
Response examples (200)
{
  "jwtToken": "string",
  "refreshToken": "string"
}