authentication

package
v0.0.0-...-46e61fc Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func (*Controller) GetAccountInfo

func (c *Controller) GetAccountInfo(token string) (*proto.GetAccountDataResponse, error)

func (*Controller) GetAccountInfoByEmail

func (c *Controller) GetAccountInfoByEmail(email string) (*proto.GetAccountDataResponse, error)

func (*Controller) IsAuthorized

func (c *Controller) IsAuthorized(data *authEntities.AuthorizationData) (bool, error)

func (*Controller) Login

type IController

type IController interface {
	Login(credentials *authEntities.LoginCredentials) (*authEntities.LoginResponse, error)
	IsAuthorized(data *authEntities.AuthorizationData) (bool, error)
	GetAccountInfo(token string) (*proto.GetAccountDataResponse, error)
	GetAccountInfoByEmail(email string) (*proto.GetAccountDataResponse, error)
}

func NewAuthenticationController

func NewAuthenticationController(appConfig app.IConfig, authHorusec horusec.IService, ldapAuth ldap.IService,
	keycloakAuth keycloak.IService, repositoryAccount accountRepository.IRepository) IController

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) GetAccountInfo

func (m *Mock) GetAccountInfo(_ string) (*proto.GetAccountDataResponse, error)

func (*Mock) GetAccountInfoByEmail

func (m *Mock) GetAccountInfoByEmail(_ string) (*proto.GetAccountDataResponse, error)

func (*Mock) IsAuthorized

func (m *Mock) IsAuthorized(_ *authEntities.AuthorizationData) (bool, error)

func (*Mock) Login

Jump to

Keyboard shortcuts

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