auth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Method() byte
	Check(conn net.Conn) bool
}

Authenticator is an interface of auth methods.

func NewNoAuth

func NewNoAuth() Authenticator

NewNoAuth news an authenticator with no auth.

func NewUaP

func NewUaP() Authenticator

NewUaP news an user&pass authenticator.

type Uap

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

func (*Uap) Add

func (a *Uap) Add(user, pass string)

func (*Uap) Check

func (a *Uap) Check(conn net.Conn) (passed bool)

func (*Uap) Delete

func (a *Uap) Delete(user string)

func (*Uap) Method

func (a *Uap) Method() byte

Jump to

Keyboard shortcuts

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