Check auth configuration Run in API Explorer

POST /auth

Validate credentials for a registry and, if available, get an identity token for accessing the registry without password.

application/json

Body

Authentication to check

  • username string
  • password string
  • email string
  • serveraddress string

Responses

  • 200 application/json

    An identity token was generated successfully.

    Hide response attributes Show response attributes object
    • Status string Required

      The status of the authentication

    • IdentityToken string

      An opaque token used to authenticate a user after a successful login

  • 204

    No error

  • 401 application/json

    Auth error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 500 application/json

    Server error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

POST /auth
curl \
 --request POST 'http://api.example.com/v1.49/auth' \
 --header "Content-Type: application/json" \
 --data '{"password":"xxxx","username":"hannibal","serveraddress":"https://index.docker.io/v1/"}'
Request examples
{
  "password": "xxxx",
  "username": "hannibal",
  "serveraddress": "https://index.docker.io/v1/"
}
Response examples (200)
{
  "Status": "Login Succeeded",
  "IdentityToken": "9cbaf023786cd7..."
}
Response examples (200)
{
  "Status": "string",
  "IdentityToken": "string"
}
Response examples (401)
{
  "message": "Something went wrong."
}
Response examples (401)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}