Libraries
    Preparing search index...

    Interface CookieSchemeOptions<T>

    Configuration for cookieScheme.

    interface CookieSchemeOptions<T> {
        cookieName: string;
        name?: string;
        validate: (cookieValue: string) => Promise<T | null>;
    }

    Type Parameters

    • T

      The type of the principal value returned by validate.

    Index

    Properties

    cookieName: string

    Name of the cookie to read (e.g. "session", "sid").

    name?: string

    Custom scheme name (default: "cookie").

    validate: (cookieValue: string) => Promise<T | null>

    Validate the cookie value and return the principal data, or null if the cookie is invalid / session expired.

    The implementer is responsible for session lookup, signature verification, etc.