Interface ClientCredentialsConfig

Configuration for the OAuth2 client-credentials provider produced by clientCredentials. Intended for confidential Node clients — the client secret must never ship to a browser.

interface ClientCredentialsConfig {
    clientId: string;
    clientSecret: string;
    clockSkewMs?: number;
    extraTokenParams?: Record<string, string>;
    fetchFn?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    };
    onEvent?: HonuaAuthEventListener;
    scopes?: readonly string[];
    serviceKey?: string;
    store?: CredentialStore;
    tokenEndpoint: string;
}

Properties

clientId: string
clientSecret: string
clockSkewMs?: number
extraTokenParams?: Record<string, string>
fetchFn?: {
    (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
    (input: string | URL | Request, init?: RequestInit): Promise<Response>;
}

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: URL | RequestInfo
      • Optionalinit: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • Parameters

      • input: string | URL | Request
      • Optionalinit: RequestInit

      Returns Promise<Response>

scopes?: readonly string[]
serviceKey?: string
tokenEndpoint: string