@opentdf/sdk
    Preparing search index...

    Class OIDCRefreshTokenProvider

    An AuthProvider that uses an OIDC refresh token to obtain an access token. It exchanges the refresh token for an access token and uses that to augment HTTP requests with credentials.

    import { OIDCRefreshTokenProvider } from '@opentdf/sdk';
    await AuthProviders.refreshAuthProvider({
    clientId: 'my-client-id',
    exchange: 'refresh',
    refreshToken: 'refresh-token-from-oidc-provider',
    oidcOrigin: 'https://example.oidc.provider.com',
    });

    Implements

    Index

    Constructors

    Properties

    oidcAuth: AccessToken
    refreshToken?: string

    Methods

    • This function should be called if the consumer of this auth provider changes the client keypair, or wishes to set the keypair after creating the object.

      Calling this function will (optionally) trigger a forcible token refresh using the cached refresh token, and update the auth server config with the current key.

      Parameters

      • signingKey: CryptoKeyPair

        the client signing key pair. Will be bound to the OIDC token and require a DPoP header, when set.

      Returns Promise<void>