Setu-TS
    Preparing search index...

    Interface AuthPluginOptions

    Auth plugin configuration options.

    0.1.0

    interface AuthPluginOptions {
        apiKey?: ApiKeyOptions;
        authorizationDiagnostics?: AuthorizationDiagnosticsOptions;
        http?: IAuthHttp;
        issuers?: readonly TrustedIssuer[];
        jwt?: JwtOptions;
        local?: LocalOptions;
        middleware?: false | AuthMiddlewareOption;
        policies?: readonly PolicyDefinition<string, never>[];
        rbac?: RbacConfig;
        scopedRbac?: ScopedRbacOptions;
        session?: SessionAuthOptions;
        signIn?: SignInConfig;
        strategies?: readonly IAuthStrategy[];
    }
    Index
    apiKey?: ApiKeyOptions

    API key configuration. Optional.

    authorizationDiagnostics?: AuthorizationDiagnosticsOptions

    Authorization decision-explanation observation (M98h). When present, the plugin attaches a collector to its own RbacService and registers an IAuthorizationDiagnosticsSource under CAPABILITIES.AUTHORIZATION_DIAGNOSTICS. When absent, the same token is still registered with a disabled-answering source. The boolean IAuthorizationService remains authoritative and unchanged; a diagnostic failure can never alter an allow/deny or a guard's short-circuit order.

    http?: IAuthHttp

    Outbound HTTP seam for issuers and signIn. Defaults to one over fetch.

    issuers?: readonly TrustedIssuer[]

    Outside identity providers whose access tokens are accepted (M100b). Builds an internal issuers strategy placed immediately after the JWT strategy, reading the same header and scheme as jwt, and registers an auth health indicator reporting each issuer's cached key-set state.

    JWT configuration. Omit when the application uses another strategy.

    local?: LocalOptions

    Local credentials configuration. Optional.

    middleware?: false | AuthMiddlewareOption

    Global authentication middleware configuration. Omit to register it at priority 300, or pass false when attaching it per route yourself.

    policies?: readonly PolicyDefinition<string, never>[]

    Authorization policies — asynchronous, target-aware checks registered under CAPABILITIES.AUTHORIZATION_POLICIES (M110a). Build each with definePolicy. Validated when AuthPlugin(...) is called: a malformed policy or two policies sharing a name refuse before any application exists. The policy service is registered whether or not this is set, so DecoratorPlugin's class-form policies have a registry too; it is sealed once the application starts.

    0.9.0

    rbac?: RbacConfig

    RBAC configuration. When absent, AuthPlugin registers JWT authentication only and does not provide the authorization capability.

    scopedRbac?: ScopedRbacOptions

    Scoped RBAC (M110b): roles granted IN a scope — a tenant, an organisation, a team — evaluated as the built-in scoped-rbac policy and checked with requireScopedRole, requireScopedPermission and DecoratorPlugin's @ScopedRoles/@ScopedPermissions. Requires rbac, whose roles are the catalogue. Validated when AuthPlugin(...) is called.

    0.9.0

    Session authentication configuration. When present, the plugin appends an internal session strategy after the API-key strategy and requires the session capability (SessionPlugin) to be registered.

    signIn?: SignInConfig

    Sign-in with an outside provider (M100c). Registers the sign-in routes, the auth-session authentication strategy, and CAPABILITIES.AUTH_SESSION, and requires the session capability (SessionPlugin).

    strategies?: readonly IAuthStrategy[]

    Caller-supplied strategies, appended after every built-in in declaration order. A strategy whose name collides with any other strategy in the assembled chain makes register() throw.