authapp

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLogConfig

type AuditLogConfig struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type Config

type Config struct {
	Listen         string           `json:"listen"`
	LogLevel       string           `json:"log_level"`
	Issuer         string           `json:"issuer"`
	BasePath       string           `json:"base_path,omitempty"`
	AccessTokenTTL string           `json:"access_token_ttl"`
	ActiveKID      string           `json:"active_kid,omitempty"`
	Key            KeyConfig        `json:"key"`
	Keys           []KeyConfig      `json:"keys,omitempty"`
	RateLimits     RateLimitsConfig `json:"rate_limits,omitempty"`
	AuditLogs      AuditLogConfig   `json:"audit_logs,omitempty"`
	Clients        []server.Client  `json:"clients"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(path string) (Config, error)

func (Config) ListenAddr

func (c Config) ListenAddr() string

type Ed25519SignerLoader

type Ed25519SignerLoader struct{}

func (Ed25519SignerLoader) LoadSigner

func (Ed25519SignerLoader) LoadSigner(cfg KeyConfig) (server.Signer, error)

type EndpointRateLimitConfig

type EndpointRateLimitConfig struct {
	Enabled *bool  `json:"enabled,omitempty"`
	Limit   int    `json:"limit,omitempty"`
	Window  string `json:"window,omitempty"`
}

type KeyConfig

type KeyConfig struct {
	KID              string `json:"kid"`
	PrivateKeyPath   string `json:"private_key_path,omitempty"`
	PrivateKeyPEMEnv string `json:"private_key_pem_env,omitempty"`
}

type RateLimitsConfig

type RateLimitsConfig struct {
	Token  EndpointRateLimitConfig `json:"token,omitempty"`
	Readyz EndpointRateLimitConfig `json:"readyz,omitempty"`
}

type Runtime

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

func New

func New(cfg Config) (*Runtime, error)

func NewWithSignerLoader

func NewWithSignerLoader(cfg Config, loader SignerLoader) (*Runtime, error)

func (*Runtime) ActiveKID

func (r *Runtime) ActiveKID() string

func (*Runtime) Mount

func (r *Runtime) Mount(routes *gin.Engine) error

func (*Runtime) SignerCount

func (r *Runtime) SignerCount() int

type SignerLoader

type SignerLoader interface {
	LoadSigner(KeyConfig) (server.Signer, error)
}

Jump to

Keyboard shortcuts

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