gnap-caep-risc-nodejs
    Preparing search index...

    Class GnapClient

    The GNAP client. GnapClient.fromFile loads the key and does not contact the authorization server; discovery happens on the first grant.

    Index
    • Headers for one request that presents grant's access token: Authorization: GNAP, and the key proof. Pass the exact body that will be sent. Mutual TLS adds no signature header; the certificate is on the connection from GnapClient.tls.

      Parameters

      • grant: Grant
      • request: { body?: string; headers?: Record<string, string>; method: string; url: string }

      Returns Record<string, string>

    • Sends url with the access token and the key proof.

      Parameters

      • grant: Grant
      • url: string
      • init: { body?: string; headers?: Record<string, string>; method?: string } = {}

      Returns Promise<HttpAnswer>

    • Completes a redirect finish. allowedIds are the pending grants this browser started: a redirect URL stolen from one browser does not finish in another. The hash is single use.

      Parameters

      • query: string | Record<string, string> | URLSearchParams
      • options: { allowedIds: readonly string[] }

      Returns Promise<FinishedGrant>