dao

package
v0.0.0-...-0026d00 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadAuthenticationFormat   = errors.New("bad authentication format")
	ErrBadPassword               = errors.New("bad password")
	ErrCredentialsMustStringType = errors.New("credentials type must string type")
)

Functions

This section is empty.

Types

type DaoAuthenticationProvider

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

DaoAuthenticationProvider struct.

func NewDaoAuthenticationProvider

func NewDaoAuthenticationProvider(passwordHasher password.Hasher, userProvider UserProvider) *DaoAuthenticationProvider

NewDaoAuthenticationProvider constructor.

func (*DaoAuthenticationProvider) Authenticate

Authenticate implements Provider.

func (*DaoAuthenticationProvider) IsSupported

func (p *DaoAuthenticationProvider) IsSupported(creds credential.Credential) bool

IsSupported returns true if credential.Credential is supported.

type MockUserProvider

type MockUserProvider struct {
	mock.Mock
}

MockUserProvider is an autogenerated mock type for the UserProvider type

func (*MockUserProvider) LoadUserByUsername

func (_m *MockUserProvider) LoadUserByUsername(username string) (user.User, error)

LoadUserByUsername provides a mock function with given fields: username

type UserProvider

type UserProvider interface {
	LoadUserByUsername(username string) (user.User, error)
}

UserProvider interface which loads user-specific data.

Jump to

Keyboard shortcuts

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