@inrupt/solid-client-authn-browser

Globals / “authenticatedFetch/fetchFactory”

Module: “authenticatedFetch/fetchFactory”

Functions

buildDpopFetch

buildDpopFetch(authToken: string, _refreshToken: string | undefined, dpopKey: JSONWebKey): Promise<typeof fetch>

Defined in browser/src/authenticatedFetch/fetchFactory.ts:83

Parameters:

Name

Type

Description

authToken

string

a DPoP token.

_refreshToken

string | undefined

An optional refresh token.

dpopKey

JSONWebKey

The private key the token is bound to.

Returns: Promise<typeof fetch>

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


buildDpopFetchOptions

buildDpopFetchOptions(targetUrl: string, authToken: string, dpopKey: JSONWebKey, defaultOptions?: RequestInit): Promise<RequestInit>

Defined in browser/src/authenticatedFetch/fetchFactory.ts:49

Parameters:

Name

Type

targetUrl

string

authToken

string

dpopKey

JSONWebKey

defaultOptions?

RequestInit

Returns: Promise<RequestInit>


isExpectedAuthError

isExpectedAuthError(statusCode: number): boolean

Defined in browser/src/authenticatedFetch/fetchFactory.ts:69

Parameters:

Name

Type

statusCode

number

Returns: boolean