auth

package
v0.27.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package auth provides the core engine for initializing, configuring, and managing modular authentication plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plugin

func Plugin[P any](a *Auth) *P

Plugin retrieves a registered plugin instance of type P from the Auth engine in a strongly-typed manner. It panics if the specified plugin has not been registered during engine initialization.

Types

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

Auth is the central authentication engine holding initialized plugins and event dispatchers.

func New

func New(opts ...config.Option) (*Auth, error)

New creates and initializes a new Auth instance with the provided configuration options. It initializes all registered plugins with a shared plugin context.

func (*Auth) Events

func (a *Auth) Events() EventBus.Bus

Events returns the global EventBus instance for subscribing to or publishing authentication lifecycle events.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL