Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Use this API to register a new user. It needs a JSON containing at least two fields: username and password (optionally you can pass it firstName and lastName). It will return a JSON message containing the registration confirmation with the access_token and the refresh_token or an error message.

Example Query

Code Block
languagetext
titlePOST Query URI
http://danteweb.lnf.infn.it:8000/auth/registration


Code Block
languagejs
titlePOST Query Payload
{
	"username": "myUser",
	"password": "myPassword",
	"firstName": "Name",
	"lastName": "Surname"
}


Code Block
languagejs
titleAPI Response
{
	"message": "User myUser was created",
	"access_token": "eyJ0eXAiOiJKV1QiLCJhbGci...ES42k",
	"refresh_token": "eyJ0eXAiOi...5yN6zUM8tQ"
}