Coding steps-Ping Federate, tokens, then finally the RestClient
I am coding this solution in Pega RDA 19.1. I need to understand the general coding commands, and the Pega objects I will use to code the following. My co-worker gave me the first 7 steps he is doing in Java. I must replicate this:
Make an initial GET call to Ping Federate to get the flow id.
Using the flow id, make a GET call to Ping Federate to get the current state of the flow (at this point, it should be “USERNAME_PASSWORD_REQUIRED”).
Make a POST call to Ping Federate to the flow, passing in the service account username and password.
Make a GET call to Ping Federate to the resume endpoint, using the flow id. This should give you an access code.
Make a POST call to Ping Federate to the token endpoint, using the access code. This will give you both the JWT token and a Refresh token.
Make a POST call to Ping Federate to the WS02 gateway, using the JWT token. This will give you a WS02 token.
Use the WS02 token when calling the REST service.
And finally I will be using RestClient to call the needed api sending it the token from 7.
Please advise. Code references or examples greatly appreciated.
***Edited by Moderator Marissa to change type from General to Product, update Platform Capability tags****
I am sorry it took so long to reply and that I do not have a better answer. In this case, I believe your colleague is calling several REST services with various interdependencies between them. There really isn't anything I can tell you from experience in using the Pega Robotics RESTClient Component with tokens retrieved from other services as these tend to require a more intimate knowledge of the services you are working with. The RESTClient Component is where you would start though. It won't have direct property/method translation to Java, but it does have similar methods/properties that you can use to work with it. You will require a certainly level of familiarity with services and what they need to be supplied and how they work even to use the component. If you have a Public service that you can test with, perhaps you can provide it here and I can create an example.