config

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: 2 Imported by: 0

Documentation

Overview

Package config defines global configuration options and functional option helpers for the Auth engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BcryptCost int
	Plugins    []plugin.Plugin
}

Config holds the main settings used when constructing an Auth instance.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns a Config initialized with sensible default values.

type Option

type Option func(*Config)

Option represents a functional configuration option for Auth.

func WithBcryptCost

func WithBcryptCost(cost int) Option

WithBcryptCost sets a custom bcrypt cost for password hashing.

func WithPlugins

func WithPlugins(plugins ...plugin.Plugin) Option

WithPlugins registers one or more modular authentication plugins into the Auth engine.

Jump to

Keyboard shortcuts

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