Iskra API Reference
    Preparing search index...

    Interface Gate<A>

    Proves who made a request: returns the actor, null when the request does not carry this gate's credential (another gate may take it), or throws a 401 AuthError when it carries one that is not valid.

    interface Gate<A extends Actor = Actor> {
        challenge?: string;
        openapi?: GateSecurity;
        (c: Context): A | Promise<A | null | undefined> | null | undefined;
    }

    Type Parameters

    • Parameters

      • c: Context

      Returns A | Promise<A | null | undefined> | null | undefined

    Index
    challenge?: string

    The WWW-Authenticate challenge of a 401 when no credential came (Bearer).

    openapi?: GateSecurity

    Its security schemes for OpenAPIFeature's spec: alternatives, each the schemes presented together. The gates of web-kit set it; a gate of your own may ([[{ name: 'mtls', scheme: { type: 'mutualTLS' } }]]).