import { ClientSecretCredentials, ExternalJwtCredentials, OIDCCredentials, RefreshTokenCredentials } from './oidc.js'; import { OIDCClientCredentialsProvider } from './oidc-clientcredentials-provider.js'; import { OIDCExternalJwtProvider } from './oidc-externaljwt-provider.js'; import { AuthProvider } from './auth.js'; import { OIDCRefreshTokenProvider } from './oidc-refreshtoken-provider.js'; /** * Creates an OIDC Client Credentials Provider for non-browser contexts. * * Both browser and non-browser flows use OIDC, but the supported OIDC auth mechanisms differ between * public (e.g. browser) clients, and confidential (e.g. Node) clients. * * This provider supports Client Credentials auth, where the client has previously been issued a ClientID and ClientSecret. * Browser contexts should *never* use Client Credentials auth, as ClientSecrets are not secure for public client flows, * and should use one of the other Authorization Code-based OIDC auth mechanisms instead. * * This just expects a clientId and clientSecret to be provided in the clientConfig, and will use that * to grant tokens via the OIDC clientCredentials flow. * * The client's public key must be set in all OIDC token requests in order to recieve a token with valid * Virtru claims. The public key may be passed to this provider's constructor, or supplied post-construction by calling * {@link updateClientPublicKey} which will force an explicit token refresh * */ export declare const clientSecretAuthProvider: (clientConfig: ClientSecretCredentials) => Promise; /** * Create an OIDC External JWT Provider for browser contexts. * * Both browser and non-browser flows use OIDC, but the supported OIDC auth mechanisms differ between * public (e.g. browser) clients, and confidential (e.g. Node) clients. * * This provider supports External JWT token exchange auth. This flow assumes that the client has previously authenticated * with an external 3rd-party IdP that oidcOrigin has been configured to trust. * * The client can supply this provider with a JWT issued by that trusted 3rd-party IdP, and that JWT will be exchanged * for a tokenset with TDF claims. * * The client's public key must be set in all OIDC token requests in order to recieve a token with valid * Virtru claims. The public key may be passed to this provider's constructor, or supplied post-construction by calling * {@link updateClientPublicKey}, which will force an explicit token refresh. */ export declare const externalAuthProvider: (clientConfig: ExternalJwtCredentials) => Promise; /** * Creates an OIDC Refresh Token Provider for browser and non-browser contexts. * * Both browser and non-browser flows use OIDC, but the supported OIDC auth mechanisms differ between * public (e.g. browser) clients, and confidential (e.g. Node) clients. * * This provider supports Refresh Token auth. This flow assumes the client has already authenticated with the OIDC * IdP using the OIDC flow fo their choice, and can provide a Refresh Token which will be exchanged (along with the client pubkey) * for a new tokenset containing valid TDF claims. * * The client's public key must be set in all OIDC token requests in order to recieve a token with valid * Virtru claims. The public key may be passed to this provider's constructor, or supplied post-construction by calling * {@link updateClientPublicKey} which will force an explicit token refresh */ export declare const refreshAuthProvider: (clientConfig: RefreshTokenCredentials) => Promise; /** * Generate an auth provder. * @param clientConfig OIDC client credentials * @param clientPubKey Client identification * @returns a promise for a new auth provider with the requested excahnge type */ export declare const clientAuthProvider: (clientConfig: OIDCCredentials) => Promise; export * from './auth.js'; export * from './OIDCCredentials.js'; export { OIDCClientCredentialsProvider } from './oidc-clientcredentials-provider.js'; export { OIDCExternalJwtProvider } from './oidc-externaljwt-provider.js'; export { OIDCRefreshTokenProvider } from './oidc-refreshtoken-provider.js'; //# sourceMappingURL=providers.d.ts.map