System Level - Set JWT Authentication Secret
URL: /admin/api/v1/system/tenants/jwtAuthenticationSecret
Method: PUT
Authentication: Super credentials
Request body
Field |
Data type |
Mandatory |
Description |
Validations |
---|---|---|---|---|
|
String |
N |
The authentication secret; for example: 2deC;p<V:3#p85?S3T#,4S][qpJ6&7R-7KT(C"rET(:<HPr3 |
Validation of authentication secret. It must contain at least one:
Length of authentication secret is dependent on JWT signing algorithm. For HS384, size minimum 48 characters. Should be encoded in Base64. |
13gb5Zi3sDzs8oNAUiHlvd2SjBRZnnoAlQ3l1eIbEFlbsciNCglGuFw8sNNLyAEZb (BASE 64)
Response body
Field |
Data type |
Mandatory |
Description |
---|---|---|---|
version |
String |
Y |
Defines the version of the API. |
status |
String |
Y |
Defines the response status. For a successful response, its value will be “success”. |
data |
Object |
Y |
This is the element which encapsulates the API response. For this API, its value is null. |
secret |
String |
Y |
This is the new authentication secret generated on the change of signing algorithm. |
HTTP status codes, error codes, and messages
HTTP response code |
Error code |
Error message |
Scenario |
---|---|---|---|
400 |
101017 |
Invalid request |
If signing algorithm name is invalid. Any other Request body validation failure. |
404 |
101018 |
Signing Algorithm not configured |
If signing algorithm is fetched while it’s not configured at the tenant level. |
404 |
101019 |
Authentication Secret not configured |
If authentication secret is fetched while it’s not configured at the tenant level. |
403 |
|
|
Unauthorized user if anybody other than the Super admin tries to access. Invalid tenant id/FQDN. |
500 |
101020 |
Internal server error |
Internal server error. |
{
"version": "1",
"status": "failure",
"error": {
"code": 101017,
"message": "Invalid request",
"errors": []
}
}