Scripted CRest Connector with Access Token

This topic has 1 reply, 1 voice, and was last updated 1 week, 1 day ago by [email protected].

  • Author
    Posts
  • #23836
     Stig Strøm
    Participant

    Hi

    I am working on a new provider integration. The integration are secured with an Access token. The flow is as following:

    1. Get an Access Token/Refresh token from Token provider from http://url1/token
    2. Call a CRUD rest api on a different url with the token received from the token provider. E.g POST http://url2/user/role

    I was thinking about using ScriptedCRESTConnector with Groovy for the action-scripts, but how to inject 2 different urls into the CRUD-scripts.

    Is it an other and better way to do this? We are currently using OpenIDM 4.5, but an update to IDM6.0 are planned in not so distance future.

    #27755

    Looking for the same answer.

    The only logical way I am thinking of is to create an interceptor that will
    a) Get an Access Token from cache
    b) Add Access Token to request
    c) if that request fails, get a new Access Token for the cache
    d) replay request with that Access Token.

    Just working it all out, as I have working example for OKHTTP3, but not Apache HTTPClient.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

©2020 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?