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) 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.
Click to show internal directories.
Click to hide internal directories.