password

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPasswordAuthenticatorWithConfig

func NewPasswordAuthenticatorWithConfig(config auth.Config) (auth.PasswordAuthenticator, error)

NewPasswordAuthenticatorWithConfig creates a new password authenticator with a configuration.

Types

type PasswordAuthenticator

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

PasswordAuthenticator is a password authenticator.

func (*PasswordAuthenticator) AuthenticatePassword

func (authenticator *PasswordAuthenticator) AuthenticatePassword(conn auth.Conn, username string, password string) (bool, error)

AuthenticatePassword authenticates a user with a password.

func (*PasswordAuthenticator) Password

func (authenticator *PasswordAuthenticator) Password() string

Password returns the authorized password.

func (*PasswordAuthenticator) User

func (authenticator *PasswordAuthenticator) User() string

User returns the authorized user.

type Service

type Service interface {
	auth.Service
	auth.PasswordAuthenticatorService
}

Service is a password authentication service.

func NewService

func NewService() Service

NewService creates a new service.

type ServiceImpl

type ServiceImpl struct {
	*plugins.BaseService
}

Service is a password authentication service.

func (*ServiceImpl) CreatePasswordAuthenticatorWithConfig

func (service *ServiceImpl) CreatePasswordAuthenticatorWithConfig(config auth.Config) (auth.PasswordAuthenticator, error)

CreatePasswordAuthenticatorWithConfig creates a new password authenticator with a configuration.

func (*ServiceImpl) ServiceName

func (service *ServiceImpl) ServiceName() string

ServiceName returns the service name.

func (*ServiceImpl) Start

func (service *ServiceImpl) Start() error

Start starts the service.

func (*ServiceImpl) Stop

func (service *ServiceImpl) Stop() error

Stop stops the service.

Jump to

Keyboard shortcuts

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