Setu-TS
    Preparing search index...

    Interface ApiKeyOptions

    API key configuration options.

    0.1.0

    interface ApiKeyOptions {
        header?: string;
        validate: (key: string) => Promise<IPrincipal | null>;
    }
    Index
    header?: string

    Header name for API key (default: 'X-API-Key').

    validate: (key: string) => Promise<IPrincipal | null>

    Callback to validate the API key and return a principal. Return null if the key is invalid.