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 user token.

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
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
Request
query Parameters
page
integer
Default: 1

The page number of the response.

Responses
200

Successful operation

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

Get a user token

Get 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

get/usertoken/{usertoken}
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "c40095f487aa1fadee54f56220f0df6b3545eb1a",
  • "data": {
    },
  • "timestamp": 1666105643386
}

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
}

Delete a user token

Delete a user token.

SecurityJWT
Request
path Parameters
usertoken
required
string or integer

The id/hash of the user token.

Responses
200

Successful operation

delete/usertoken/{usertoken}
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "8739602554c7f3241958e3cc9b57fdecb474d508",
  • "data": { },
  • "timestamp": 1666700570602
}

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

Disable a user token. Closes all user sessions of the 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": "3ac02d38a2364813a0069fdc4bb8a2efdae95901",
  • "data": {
    },
  • "timestamp": 1666704076971
}