@inrupt/solid-client-authn-core
    Preparing search index...

    Function buildAuthenticatedFetch

    • Parameters

      • accessToken: string

        an access token, either a Bearer token or a DPoP one.

      • Optionaloptions: {
            dpopKey?: KeyPair;
            eventEmitter?: EventEmitter<DefaultEventMap>;
            expiresIn?: number;
            fetch?: {
                (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
                (input: string | URL | Request, init?: RequestInit): Promise<Response>;
            };
            refreshOptions?: RefreshOptions;
        }

        The option object may contain two objects: the DPoP key token is bound to if applicable, and options to customize token renewal behavior.

        • OptionaldpopKey?: KeyPair
        • OptionaleventEmitter?: EventEmitter<DefaultEventMap>
        • OptionalexpiresIn?: number
        • Optionalfetch?: {
              (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
              (input: string | URL | Request, init?: RequestInit): Promise<Response>;
          }

          A custom fetch function (defaults to the global fetch).

        • OptionalrefreshOptions?: RefreshOptions

      Returns {
          (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
          (input: string | URL | Request, init?: RequestInit): Promise<Response>;
      }

      A fetch function that adds an appropriate Authorization header with the provided token, and adds a DPoP header if applicable.

        • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
        • Parameters

          • input: URL | RequestInfo
          • Optionalinit: RequestInit

          Returns Promise<Response>

        • (input: string | URL | Request, init?: RequestInit): Promise<Response>
        • Parameters

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

          Returns Promise<Response>