can anyone tell me how do i get to know age of token when saved in Gateway cache.
for Eg : I have generated a token and saved in gateway cache with expiry time of 1000 sec, now when i invoke the API i will get the token from cache. Now here i want to know what is the time left before token expire gets expired.
I need assertion for getting this details.
While there is no set assertion for this information, it does exist in the database for the token itself.
You could use a JDBC Query to acheive this information with a SELECT command to the OTK DB.
Ex: select created, expiration from oauth_token where token like 'b4b50907-6823-4da3-9943-a2dee54d8da2';
--to find when it was created and when expires (in epoch time), and then reference that with current time to see how long is left on the cache etc.