auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 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)
}

type AuthService

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

func NewAuthService

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

func (*AuthService) AuthLogin

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

func (*AuthService) AuthLogout

func (as *AuthService) AuthLogout() error

func (*AuthService) IsAuthenticated

func (as *AuthService) IsAuthenticated() bool

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