auth

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalAuthenticator

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

LocalAuthenticator implements simple token-based auth

func NewLocalAuthenticator

func NewLocalAuthenticator(sessionPath, adminEmail, adminPassword string) *LocalAuthenticator

NewLocalAuthenticator creates a new local authenticator If sessionPath is provided, sessions are persisted to disk

func (*LocalAuthenticator) Authenticate

func (a *LocalAuthenticator) Authenticate(token string) (*api.User, error)

Authenticate validates a token and returns the user

func (*LocalAuthenticator) Login

func (a *LocalAuthenticator) Login(email, password string) (*api.User, string, error)

Login creates a new session and returns a token

func (*LocalAuthenticator) Logout

func (a *LocalAuthenticator) Logout(token string) error

Logout invalidates a token

func (*LocalAuthenticator) Shutdown added in v0.0.2

func (a *LocalAuthenticator) Shutdown()

Shutdown gracefully stops the authenticator

Jump to

Keyboard shortcuts

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