Setu-TS
    Preparing search index...

    Interface IAuthStrategy

    Authentication strategy interface. Implementations extract credentials from a request and return a principal, or null if the strategy does not apply.

    0.1.0

    interface IAuthStrategy {
        credential?: "header" | "cookie";
        name: string;
        authenticate(request: IRequest): Promise<IPrincipal | null>;
    }
    Index
    credential?: "header" | "cookie"

    Where this strategy reads its credential. 'header' — a credential the client sends explicitly (a bearer or API-key header); 'cookie' — one the browser attaches by itself (a session cookie). Read by form CSRF: only a request authenticated by a 'header' strategy may skip the synchronizer-token check. Absent is treated as 'cookie' (fail closed).

    0.10.0

    name: string

    Strategy name for identification.