Authentication

The following are Autonomous Identity authentication endpoints:

POST Login

Log in to the system. The endpoint accepts the username and password in the body of the request. The token provided has an expiry date that can be obtained by decoding the returned JWT and using the exp data inside the token.

Endpoint

/api/authentication/login

Headers

Content-Type      application/json

Body

{
	"username": "admin@test.com",
	"password": "test"
}

Example Request

curl --location --request POST '/api/authentication/login' \
--header 'Content-Type: application/json' \
--data-raw '{
	"username": "admin@test.com",
	"password": "test"
}'
POST renewToken

Renew a token for the system. The endpoint accepts the JWT in the header Authorization: Bearer $JWT. The expiry time of the token is reset and return in the new token.

Endpoint

/api/authentication/renewToken

Authorization

Token             <token>

Headers

Content-Type      application/json

Body

''

Example Request

curl --location --request POST '/api/authentication/renewToken' \
--header 'Content-Type: application/json' \
--data-raw ''
GET actions

Retrieve the permitted actions of the currently authenticated user.

Endpoint

/api/authentication/action

Authorization

Token            <token>

Headers

Content-Type      application/json

Example Request

curl --location --request GET '/api/authentication/actions' \
--header 'Content-Type: application/json'