RTO Java example

Options
dumitru.arama
edited July 16 in WebSocket API

Hello,

Our client is currently migrating to v2 authentication and is in process of testing the following RTO Java sample code:

websocket-api/Applications/Examples/RTO/java/MarketPriceRTOClientCredAuth.java at master · Refinitiv/websocket-api · GitHub

They are concerned that the MarketPriceRTOClientCredAuth.java posted on the website link above is incorrect specifically with the way it periodically re-authenticates.

They do not see a grant_type of refresh_token, and furthermore, the newly returned access_token from the HTTP authentication request is not being passed back into the web socket.

Can you please help?
Thank you

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    Hello @dumitru.arama

    I checked the Java RTO example and did not find any discrepancies. There is no concept of periodic access token refresh when using Client Credentials, but if there is a connection loss, a valid token is required. This means the app has to re-authenticate if the token is expired. This is what is implemented in the code sample.

    They do not see a grant_type of refresh_token, and furthermore, the newly returned access_token from the HTTP authentication request is not being passed back into the web socket.

    There is no Refresh token when using client credentials.

    PS: There is an option to use RTSDK Java, which can handle all the discovery and session management tasks for the user. See this example on GitHub.

Answers