Revoke authentication token
Example of request:
{"token":"existing token"}
media type | data type |
---|---|
application/json | TokenInfoTO (JSON) |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON Response with information, whether the revoking has or has not been succeeded. |
DELETE /api/authtokens
Content-Type: application/json
Accept: application/json
{
"userFullName" : "...",
"currentUserId" : 12345,
"context" : [ "AddCommentToChangeRequest", "ChangeStateOfChangeRequest" ],
"lastUpdate" : "...",
"userInfo" : { },
"contextAsCodesArray" : [ 12345, 12345 ],
"token" : "...",
"userId" : 12345
}
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
Create new authentication token
Example of request:
{"userId":user_id,"context":[list of contexts]}
media type | data type |
---|---|
application/json | TokenInfoTO (JSON) |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON Response with information, whether the creation has or has not been succeeded. |
POST /api/authtokens
Content-Type: application/json
Accept: application/json
{
"userFullName" : "...",
"currentUserId" : 12345,
"context" : [ "AddCommentToChangeRequest", "AddCommentToChangeRequest" ],
"lastUpdate" : "...",
"userInfo" : { },
"contextAsCodesArray" : [ 12345, 12345 ],
"token" : "...",
"userId" : 12345
}
HTTP/1.1 201 Created
Content-Type: application/json
{ }
Update authentication token
Example of request:
{"token":"existing token","userId":user_id,"context":[list of contexts]}
media type | data type |
---|---|
application/json | TokenInfoTO (JSON) |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON Response with information, whether the updating has or has not been succeeded. |
PUT /api/authtokens
Content-Type: application/json
Accept: application/json
{
"userFullName" : "...",
"currentUserId" : 12345,
"context" : [ "ChangeStateOfChangeRequest", "AddCommentToChangeRequest" ],
"lastUpdate" : "...",
"userInfo" : { },
"contextAsCodesArray" : [ 12345, 12345 ],
"token" : "...",
"userId" : 12345
}
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
Get all authentication tokens.
media type | data type | description |
---|---|---|
application/json | object (JSON) | JSON Response with the list of tokens.
Example of response:
{"list":[{"context": [{"name": "Context name","code": context_code}],"userId":user_id,"userFullName":"User Full Name","token":"alphanumeric_token"}]}
|
GET /api/authtokens/json
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Get all possible contexts for authentication tokens.
media type | data type | description |
---|---|---|
application/json | object (JSON) | JSON Response with the list of contexts with possible endpoints.
Example of response:
{list: [{"code": 1,"name": "contextName1"},{"code":2,"name":"contextName2"}]}
|
GET /api/authtokens/context/json
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
...