auth

package
v0.5.23 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPersistencyLayer

type AuthPersistencyLayer interface {
	Authenticate(username, password string) error
	SessionToken() string
	GetOwner() domain.Owner
	SetOwner(domain.Owner) (domain.Owner, error)
	PrivateKey() ed25519.PrivateKey
	Logout()
}

type AuthService

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

func NewAuthService

func NewAuthService(
	authRepo AuthPersistencyLayer,
	userRepo UserPersistencyLayer,
	authReady chan domain.AuthNodeInfo,
) *AuthService

func (*AuthService) AuthLogin

func (as *AuthService) AuthLogin(message event.LoginEvent) (authInfo event.LoginResponse, err error)

func (*AuthService) IsAuthenticated

func (as *AuthService) IsAuthenticated() bool

func (*AuthService) PrivateKey

func (as *AuthService) PrivateKey() ed25519.PrivateKey

func (*AuthService) Storage

func (as *AuthService) Storage() AuthPersistencyLayer

type UserPersistencyLayer

type UserPersistencyLayer interface {
	Create(user domain.User) (domain.User, error)
	Update(userId string, newUser domain.User) (domain.User, error)
}

Jump to

Keyboard shortcuts

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