Skip to content
LogoLogo

Identity.Server.headersOf

Collect identity protocol headers

Returns the request and response header names declared by identity checks.

Usage

import * as  from 'mppx/identity'
 
const : . = {
  : { : ['X-Identity-Proof'], : ['Identity-Required'] },
  : () => ({ : 'missing' }),
}
 
const  = ..([])
.(.)
['x-identity-proof']

Names are validated as HTTP field names, lowercased, and deduplicated. A proxy uses the result to strip protocol headers from upstream requests and responses.

Return type

type ReturnType = Readonly<{
  request: readonly string[]
  response: readonly string[]
}>

Parameters

checks

  • Type: readonly (Identity.Verifier | Identity.PaymentCheck | undefined)[]

The route's identity verifiers and payment checks.