Creates a TokenProvider that uses a refresh token to obtain access tokens. On the first call, exchanges the refresh token. Subsequent calls use the latest refresh token from the IdP response.
const client = new OpenTDF({ interceptors: [authTokenInterceptor(refreshTokenProvider({ clientId: 'my-app', refreshToken: 'refresh-token-from-login', oidcOrigin: 'http://localhost:8080/auth/realms/opentdf', }))], platformUrl: 'http://localhost:8080',}); Copy
const client = new OpenTDF({ interceptors: [authTokenInterceptor(refreshTokenProvider({ clientId: 'my-app', refreshToken: 'refresh-token-from-login', oidcOrigin: 'http://localhost:8080/auth/realms/opentdf', }))], platformUrl: 'http://localhost:8080',});
Creates a TokenProvider that uses a refresh token to obtain access tokens. On the first call, exchanges the refresh token. Subsequent calls use the latest refresh token from the IdP response.