auth_domain

package
v0.0.0-...-704a905 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSetSession    = errors.New("error while set session")
	ErrDeleteSession = errors.New("error while delete session")

	ErrInvalidLoginOrPassword = errors.New("invalid login or password")
	ErrUserAlreadyExist       = errors.New("user already exist")

	ErrDatabaseUnexpected = errors.New("database unexpected error")
)

Functions

This section is empty.

Types

type AuthAgent

type AuthAgent interface {
	GetSession(sessionId string) (*auth_microservice_domain.Session, error)
	SetNewUnauthorizedSession(expires time.Duration) (sessionId string, err error)
	SetNewAuthorizedSession(userId uint, expires time.Duration) (sessionId string, err error)
	MakeSessionAuthorized(sessionId string, userId uint) (newSessionId string, err error)
	MakeSessionUnauthorized(sessionId string) (newSessionId string, err error)
	DeleteSession(sessionId string) error
	IsSession(sessionId string) bool
	IsAuthSession(sessionId string) bool
}

type AuthUseCase

type AuthUseCase interface {
	Login(login string, password string) (sessionId string, err error)
	Logout(sessionId string) error
	SignUp(user *user_microservice_domain.User) (sessionId string, err error)
	GetUnauthorizedSession() (sessionId string, err error)
	IsSession(sessionId string) bool
	IsAuthSession(sessionId string) bool
}

Directories

Path Synopsis
client
delivery

Jump to

Keyboard shortcuts

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