@agorio/sdkDocs


Class: AgentAttestation

Constructors

new AgentAttestation()

new AgentAttestation(options): AgentAttestation

Parameters

options: AttestationOptions

Returns

AgentAttestation

Defined in

src/security/agent-attestation.ts:93

Properties

headerName

readonly static headerName: "X-Agorio-Attestation" = HEADER_NAME

Header name the SDK and merchant agree on.

Defined in

src/security/agent-attestation.ts:107

Methods

signRequest()

signRequest(input): Promise<string>

Compute the attestation header value for an outgoing request. Returns a string ready to be set as X-Agorio-Attestation.

Parameters

input: SignRequestInput

Returns

Promise<string>

Defined in

src/security/agent-attestation.ts:113


wrapFetch()

wrapFetch(baseFetch): any

Wrap a fetch implementation to attach the attestation header automatically. The wrapped fetch sets X-Agorio-Attestation on every outgoing request.

Parameters

baseFetch: any = globalThis.fetch

Returns

any

Defined in

src/security/agent-attestation.ts:139