Authentication
The following are Autonomous Identity authentication endpoints (New APIs introduced in this release are marked with ):
POST /api/authentication/login
- POST /api/authentication/login
-
Log in to the system. The endpoint accepts the
username
andpassword
in the body of the request. The token provided has an expiry date that can be obtained by decoding the returned JWT and using theexp
data inside the token. [All]Endpoint
/api/authentication/login
Headers
Content-Type application/json
Body
{ "username": "admin@test.com", "password": "test" }
Example Request
curl --location --request POST 'https://autoid-api.forgerock.com/api/authentication/login' \ --header 'Content-Type: application/json' \ --data-raw '{ "username": "admin@test.com", "password": "test" }'
Example Response
{ "user": { "dn": "cn=test.user@test.com,dc=example,dc=org", "controls": [], "gidNumber": "7777", "uid": "test.user", "displayName": "Test User", "_groups": [ "Admin" ] }, "token": "123456" }
GET /api/authentication/verify
- GET /api/authentication/verify
-
Verify the authenticity of a bearer token.
Endpoint
/api/authentication/verify
Authorization
Token <token>
Headers
Content-Type application/json
Body
''
Example Request
curl --location --request GET 'https://autoid-api.forgerock.com/api/authentication/verify' \ --header 'Content-Type: application/json'
Example Response
{ "user": { "controls": [], "displayName": "Bob Rodgers", "email": "bob.rodgers@forgerock.com", "dn": "cn=bob.rodgers@forgerock.com,ou=People,dc=zoran,dc=com", "gidNumber": "999", "uid": "bob.rodgers", "_groups": [ "Zoran Admin" ], "iat": 1628893019, "exp": 1628936219, "aud": "http://my.service", "sub": "6711197" } }
POST /api/authentication/renewToken
- POST /api/authentication/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. [All]Endpoint
/api/authentication/renewToken
Authorization
Token <token>
Headers
Content-Type application/json
Body
''
Example Request
curl --location --request POST 'https://autoid-api.forgerock.com/api/authentication/renewToken' \ --header 'Content-Type: application/json' \ --data-raw ''
Example Response
{ "user": { "dn": "cn=test.user@test.com,dc=example,dc=org", "controls": [], "gidNumber": "7777", "uid": "test.user", "displayName": "Test User", "_groups": [ "Admin" ] }, "token": "123456" }
GET /api/authentication/actions
- GET /api/authentication/actions
-
Retrieve the permitted actions of the currently authenticated user. [All]
Endpoint
/api/authentication/action
Headers
Content-Type application/json
Example Request
curl --location --request GET 'https://autoid-api.forgerock.com/api/authentication/actions' \ --header 'Content-Type: application/json'
Example Response
{ "userActions": [ "*" ], "roleTitle": "Unknown", "homepage": "company" }