User token

The user token.

Create a user token

Create a new user token.

SecurityJWT
Request
Request Body schema: application/json

A JSON object containing user token information.

name
required
string <= 1000 characters

The name of the new user token.

ttl
integer or null >= 1

The time to life (in days) of the new user token.

Set the ttl to null for an unlimited runtime

Value: null
password
required
string

The password of the user.

Responses
201

Successful operation

422

Unprocessable Content

post/usertoken
Request samples
application/json
{
  • "name": "Titan Token",
  • "password": "WoWar1chUnsicher?",
  • "ttl": null
}
Response samples
application/json
{
  • "success": true,
  • "hash": "9277088242b81018e6c6c713c7b1b21d917fe3db",
  • "data": {
    },
  • "timestamp": 1662371755915
}

Get all user tokens

Get all user tokens of the authenticated hub.

SecurityJWT
Responses
200

Successful operation

404

Not Found

get/usertoken
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "e9bacecdf0dff78433501490aea1dca70e6f8cbe",
  • "data": [
    ],
  • "timestamp": 1662373675954
}

Update a user token

Update a user token.

SecurityJWT
Request
path Parameters
usertoken
required
string or integer

The id/hash of the user token.

Request Body schema: application/json

A JSON object containing user token information.

name
required
string <= 1000 characters

The name of the user token.

Responses
200

Successful operation

404

Not Found

422

Unprocessable Content

put/usertoken/{usertoken}
Request samples
application/json
{
  • "name": "Token Titan"
}
Response samples
application/json
{
  • "success": true,
  • "hash": "00ac6710fe092dced127d65879e90433c41202e5",
  • "data": {
    },
  • "timestamp": 1662473958844
}

Renew a user token

Renew a user token.

SecurityJWT
Request
path Parameters
usertoken
required
string or integer

The id/hash of the user token.

Request Body schema: application/json

A JSON object containing user token information.

ttl
integer or null >= 1

The time to life (in days) of the user token.

Set the ttl to null for an unlimited runtime

Value: null
password
required
string

The password of the user.

Responses
200

Successful operation

404

Not Found

422

Unprocessable Content

put/usertoken/{usertoken}/renew
Request samples
application/json
{
  • "ttl": null,
  • "password": "WoWar1chUnsicher?"
}
Response samples
application/json
{
  • "success": true,
  • "hash": "e5099b2eb08d3462c661551b8f8373b3f9ff0cc6",
  • "data": {
    },
  • "timestamp": 1662374488143
}

Revoke a user token

Revoke a user token.

SecurityJWT
Request
path Parameters
usertoken
required
string or integer

The id/hash of the user token.

Responses
200

Successful operation

404

Not Found

put/usertoken/{usertoken}/revoke
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "8739602554c7f3241958e3cc9b57fdecb474d508",
  • "data": [ ],
  • "timestamp": 1662374952635
}