Hi All,
I'm using Script runner to call external Rest API. without Authentication i'm able to connect to External API. Now service has been integrated with ping authentication. i need get the token first before calling the service and pass the received token.
1. Obtain ‘Access Token’ from Ping Federate by passing:
make post request to https://ssodev.example.com/as/token.oauth2
Post should have below name value pair in Header Section
2. I will get access token in below format ( for reference )
3. will Call Ping URL ( using Get/Post/… verb) and include below attributes in its Header section during call :
Authorization: Bearer iWsdfhfghUEjLkccxK3KB8
I need guidance, how to achieve it.
(Note- Only re-generate new access token when get ‘Unauthorised’ error (401 HTTP) - for better performance and to avoid unnecessary network calls.)