I have implemented OIDC Connect authentication in my application and IDP is PingOne. The authentication flow is working as expected. IDP returns both AccessToken and IDToken in the api as part of authentication. However Pega is only saving IDToken to Clipboard pages and AccessToken is not saved to any page on clipboard. How do i retrieve/get the AccessToken in the post authentication activity. After authentication, We have a requirement to call external API by passing AccessToken as parameter to login/authenticate user in external system and retrieve the token from external system and use the token in the subsequent API calls to the external system.
// get AccessToken from IDP
String accessToken = oauth2Client.getAccessToken();
// Process the Access Token in jwt format to Json
// Map the JSON Token Data to StepPage
Note: Pega also stores Access Token in DB in Table PR_DATA_TOKEN - Access Token, Client ID, Scope etc are stored in this table