go fmt
This commit is contained in:
parent
f819320f5a
commit
b8d9118b56
2
ldap.go
2
ldap.go
@ -48,7 +48,6 @@ func (l LDAP) Connect() (*LDAPConn, error) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
type LDAPConn struct {
|
||||
LDAP
|
||||
connection *ldap.Conn
|
||||
@ -125,6 +124,5 @@ func (l LDAPConn) ChangePassword(dn string, rawpassword string) error {
|
||||
modify := ldap.NewModifyRequest(dn)
|
||||
modify.Replace("userPassword", []string{"{CRYPT}" + hashedpasswd})
|
||||
|
||||
|
||||
return l.connection.Modify(modify)
|
||||
}
|
||||
|
3
lost.go
3
lost.go
@ -5,8 +5,8 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
"io"
|
||||
"net/http"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"time"
|
||||
@ -51,7 +51,6 @@ func (l LDAPConn) genToken(dn string, previous bool) string {
|
||||
return base64.StdEncoding.EncodeToString(hash.Sum(nil)[:])
|
||||
}
|
||||
|
||||
|
||||
func lostPassword(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != "POST" {
|
||||
displayTmpl(w, "lost.html", map[string]interface{}{})
|
||||
|
1
main.go
1
main.go
@ -23,7 +23,6 @@ var myLDAP = LDAP{
|
||||
BaseDN: "dc=example,dc=com",
|
||||
}
|
||||
|
||||
|
||||
type ResponseWriterPrefix struct {
|
||||
real http.ResponseWriter
|
||||
prefix string
|
||||
|
Loading…
Reference in New Issue
Block a user