PluginsAPI Keys

Reference

API Key plugin options, permissions, and schema reference.

Reference extends the Kernia auth server with feature-specific routes and schema.

Installation

uv add kernia

Import path

from kernia.plugins.reference import reference

Server configuration

import os

from kernia import KerniaOptions
from kernia.auth import init

from kernia.plugins.reference import reference

auth = init(KerniaOptions(
    database=adapter,
    secret=os.environ["KERNIA_SECRET"],
    base_url=os.environ["KERNIA_BASE_URL"],
    plugins=(
        reference(),
    ),
))

Routes

This feature does not currently expose routes in the local package, or its routes are created dynamically. Document exact routes before marking a UI flow as live.

Schema changes

Run kernia generate or kernia migrate after enabling this plugin. Plugin schema is merged with the core user, session, account, and verification tables.

Options and behavior

  • API Key plugin options
  • Permissions
  • Setting Default Permissions
  • Creating API Keys with Permissions
  • Verifying API Keys with Required Permissions
  • Updating API Key Permissions
  • Permissions Structure
  • Schema