auth

package
v0.0.0-...-11ecd60 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	Init()
	CheckDestinationIP(dstip string, Username string, Password string) bool
	Authenticate(Username string, Password string) bool
}

type LDAPAuth

type LDAPAuth struct {
	LDAPAddr           string
	DCString           string
	IPAddressAttribute string
	UserRDN            string
}

func (LDAPAuth) Authenticate

func (this LDAPAuth) Authenticate(username string, password string) bool

func (LDAPAuth) CheckDestinationIP

func (this LDAPAuth) CheckDestinationIP(dstip string, username string, password string) bool

func (LDAPAuth) CheckSourceIP

func (this LDAPAuth) CheckSourceIP(srcip string) bool

func (LDAPAuth) Init

func (this LDAPAuth) Init()

type TestAuth

type TestAuth struct {
	Users map[string]string
}

func (TestAuth) Authenticate

func (this TestAuth) Authenticate(Username string, Password string) bool

func (TestAuth) CheckDestinationIP

func (this TestAuth) CheckDestinationIP(dstip string, Username string, Password string) bool

func (TestAuth) Init

func (this TestAuth) Init()

Jump to

Keyboard shortcuts

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