mycocepurus-smithii - v2.0.1
    Preparing search index...

    Interface IdempotentOptions

    interface IdempotentOptions {
        fingerprint?: (request: Request) => string | Promise<string>;
        refuse: (
            error: MycocepurusError,
            request: Request,
        ) => Response | Promise<Response>;
        scope: (request: Request) => string | Promise<string>;
    }
    Index
    fingerprint?: (request: Request) => string | Promise<string>

    Replaces fingerprintRequest when your notion of "the same request" differs.

    refuse: (
        error: MycocepurusError,
        request: Request,
    ) => Response | Promise<Response>

    The response for a refusal. statusFor gives the draft's status; the body, content type and any documentation link are your API's.

    scope: (request: Request) => string | Promise<string>

    Whose request this is: a user id, an API key id, a tenant. Required, because keys from two clients must never meet, and only your auth layer knows which client this is.