app

package
v0.0.0-...-0528242 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePassword

func ChangePassword(w http.ResponseWriter, req *http.Request)

ChangePassword : Serves index page on POST request - executes the change

func ServeAssets

func ServeAssets(w http.ResponseWriter, req *http.Request)

ServeAssets : Serves the static assets

func ServeIndex

func ServeIndex(w http.ResponseWriter, req *http.Request)

ServeIndex : Serves index page on GET request

Types

type LDAPClient

type LDAPClient struct {
	Name             string // canonical name (ie. corporate.ad)
	Host             string // LDAP host
	Port             int    // port number
	LDAPType         string // AD or LDAP
	SecurityProtocol SecurityProtocol
	SkipVerify       bool
	BindDN           string // Template for the Bind DN
	BindDNpass       string // Template for the Bind DN PAssword
	UserSearchFilter string // User Search Filter
	UserBase         string // Base search path for users
	UserDN           string // Template for the DN of the user for simple auth
	Enabled          bool   // if this LDAPClient is disabled
}

LDAPClient Basic LDAP authentication service

func NewLDAPClient

func NewLDAPClient() *LDAPClient

NewLDAPClient : Creates new LDAPClient capable of binding and changing passwords

func (*LDAPClient) ModifyPassword

func (ls *LDAPClient) ModifyPassword(name, passwd, newPassword string) error

ModifyPassword : modify user's password

type RegexpHandler

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

RegexpHandler is used for http handler to bind using regular expressions

func (*RegexpHandler) HandleFunc

func (h *RegexpHandler) HandleFunc(r string, v string, handler func(http.ResponseWriter, *http.Request))

HandleFunc binds http handler function on RegexpHandler

func (*RegexpHandler) Handler

func (h *RegexpHandler) Handler(pattern *regexp.Regexp, verb string, handler http.Handler)

Handler binds http handler on RegexpHandler

func (*RegexpHandler) ServeHTTP

func (h *RegexpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SecurityProtocol

type SecurityProtocol int

SecurityProtocol protocol type

const (
	SecurityProtocolUnencrypted SecurityProtocol = iota
	SecurityProtocolLDAPS
	SecurityProtocolStartTLS
)

Note: new type must be added at the end of list to maintain compatibility.

Jump to

Keyboard shortcuts

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