property SessionAuthOptions.toPrincipal

Maps an opened session to the principal it carries. Return null when the session holds no identity — the strategy chain then continues.

Type

(view: SessionView) => IPrincipal | null

Usage

import { type SessionAuthOptions } from "auth-plugin/src/index.ts";