OIDC Access Token expiration problem
Hi Everyone,
I have OpenID connect authentication in my application (usingn pega 8.5.5) and it is working fine, until i found accesstoken expiration problem.
After an authentication succeed, The Access Token received from the external system has expiration time. Each time we refresh the User Token, we have to retrieve and pass the AccessToken to get the userinfo.
If the AccessToken is expired, we have to refresh the AccessToken and pass the latest AccessToken. How do we refresh the AccessToken ?. Is there any API available to refresh the AccessToken. I am looking at making a Connect-REST call to Token API to retrieve the AccessToken. To do this i need to retrieve the RefreshToken sent from IDP. But I am not seeing any Pega API to retrieve the RefreshToken for the current user. I looked at the AccessToken Blob in DB, RefreshToken is encrypted. Unable to retrieve the decrypted value of RefreshToken.
i alsotrying to call com.pega.pegarules.pub.connect.oauth2.OAuth2Client.RevokeToken(), this function delete the Data-Admin-Security-OAuth2-AccessToken, but now i am stuck how to register new Data-Admin-Security-OAuth2-AccessToken with the new access token.
is there another way to achieve how to refresh or get new access token to Data-Admin-Security-OAuth2-AccessToken?.
Any help or comment would be appreciated.
Thank you,
Musa