Bootstrap FreeKB - Venafi (Certificate Management) - Verify OAuth Bearer Token using REST API
Venafi (Certificate Management) - Verify OAuth Bearer Token using REST API


This assumes you have already obtained a Bearer Token using curl. The following curl command can be used to verify your Bearer Token. In this example, the Bearer Token is abc123.

curl
--insecure
--request GET
--header "Authorization: Bearer abc123"
--header "Accept: application/json" 
--url https://tpp.example.com/vedauth/authorize/verify

 

If the Bearer Token fails verification, something like this should be returned.

{
 "error":"invalid_token",
 "error_description":"The access token provided is expired, revoked, malformed, or invalid for other reasons"
}

 

Or something like this.

{
 "error":"invalid_token",
 "error_description":"Grant not found"
}

 

On the other hand, if the Bearer Token if validated, something like this should be returned.

{
 "access_issued_on":"\/Date(1623839498030)\/",
 "access_issued_on_ISO8601":"2021-06-16T10:31:38Z",
 "access_issued_on_unix_time":1623839498,
 "application":"foo",
 "expires":"\/Date(1655375498030)\/",
 "expires_ISO8601":"2022-06-16T10:31:38Z",
 "expires_unix_time":1655375498,
 "grant_issued_on":"\/Date(1623839498030)\/",
 "grant_issued_on_ISO8601":"2021-06-16T10:31:38Z",
 "grant_issued_on_unix_time":1623839498,
 "identity":"bar:6457517e-04a5-46e4-8ed4-7e515764a504",
 "scope":"agent:delete;certificate:approve,delete,discover,manage,revoke;codesign:delete,manage;configuration:delete,manage;restricted:delete,manage;security:delete,manage;ssh:approve,delete,discover,manage;statistics",
 "valid_for":31536000
}

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 9d5603 in the box below so that we can be sure you are a human.