gnap-caep-client
    Preparing search index...

    Interface GNAPClientConfig

    interface GNAPClientConfig {
        access?: (string | Record<string, any>)[];
        alg?: string;
        allowInsecureRequests?: boolean;
        classId?: string;
        clockToleranceSec?: number;
        discoveryCacheTtlMs?: number;
        display?: { logo_uri?: string; name?: string; uri?: string };
        fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
        finishUri?: string;
        grantEndpoint?: string;
        hashMethod?: "sha-256" | "sha-512";
        httpTimeoutMs?: number;
        idToken?: {
            algorithms?: string[];
            audience?: string | string[];
            issuer: string;
            jwksUri?: string;
        };
        instanceStore?: TokenStore;
        key?: ClientKey;
        keyStore?: KeyStore;
        maxWaitSec?: number;
        metadata?: Record<string, any>;
        requireBoundTokens?: boolean;
        signals?: boolean;
        subject?: false | { assertionFormats?: string[]; subIdFormats?: string[] };
        transactionStore?: TransactionStore;
        transactionTtlSec?: number;
        useInstanceId?: boolean;
    }
    Index
    access?: (string | Record<string, any>)[]

    The access rights to request by default (section 8): reference strings such as "ssf.read", or objects with type, actions, ...

    alg?: string

    Client key algorithm (default ES256).

    allowInsecureRequests?: boolean

    Allow non-TLS endpoints and finish URIs other than loopback (default false).

    classId?: string

    The client's class_id (section 2.3): the identifier of the registered application this key is an instance of. An AS that accepts unregistered instances (iya-sts: gnap.unregisteredInstances, the default) then accepts a browser's key with no registration of its own.

    clockToleranceSec?: number

    Allowed clock skew for an id_token assertion (default 30).

    discoveryCacheTtlMs?: number

    How long a discovery document is cached (default 1h).

    display?: { logo_uri?: string; name?: string; uri?: string }

    What the approval page shows about this client (section 2.3.2): self-declared, never a reason for more trust.

    fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

    Custom fetch implementation.

    Type Declaration

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

        • input: RequestInfo | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

    finishUri?: string

    Where the AS sends the browser back after interaction (the redirect finish URI, section 2.5.2). Required for a redirect interaction.

    grantEndpoint?: string

    The AS's grant endpoint, e.g. https://as.example.com/gnap. Its discovery document is read with an OPTIONS request (RFC 9635 section 9).

    hashMethod?: "sha-256" | "sha-512"

    The interaction hash method to ask for (default sha-256).

    httpTimeoutMs?: number

    Per-request timeout (default 10000).

    idToken?: {
        algorithms?: string[];
        audience?: string | string[];
        issuer: string;
        jwksUri?: string;
    }

    Verify an id_token subject assertion against this issuer's keys. Without it, an assertion is kept as received and never decoded.

    instanceStore?: TokenStore

    Where an instance_id is remembered.

    key?: ClientKey

    The client key. Default: loaded from, or created in, keyStore.

    keyStore?: KeyStore

    Where the key is kept (default memory: a new client instance every page load). Use new IndexedDBKeyStore() to keep a non-extractable key.

    maxWaitSec?: number

    The longest wait (section 3.1) the client sleeps for a too_fast continuation before giving up (default 10).

    metadata?: Record<string, any>

    A discovery document to use instead of discovering one.

    requireBoundTokens?: boolean

    Refuse an access token issued with the bearer flag (section 3.2.1): this client asks for key-bound tokens. Default true.

    signals?: boolean

    CAEP and RISC. Omitted or true is on. false removes ssf.read and ssf.manage from the grant request. The subject request is unchanged.

    subject?: false | { assertionFormats?: string[]; subIdFormats?: string[] }

    Who the resource owner is (section 2.2). Default { subIdFormats: ['iss_sub', 'opaque'] }. false asks for nothing.

    transactionStore?: TransactionStore

    Where pending grants wait for the callback (default sessionStorage).

    transactionTtlSec?: number

    How long a pending grant stays redeemable (default 600).

    useInstanceId?: boolean

    Send the instance_id the AS handed out (section 3.5) instead of the key by value in later requests. Default false.