added new basic auth endpoint
This commit is contained in:
parent
804842e7c5
commit
8c9ab3b8d2
10 changed files with 249 additions and 51 deletions
|
|
@ -7,11 +7,10 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
func validatePassword(pw string) (b []byte) {
|
||||
func validatePassword(pw string) []byte {
|
||||
hash := sha256.New()
|
||||
hash.Write(b)
|
||||
b = hash.Sum(nil)
|
||||
return
|
||||
hash.Write([]byte(pw))
|
||||
return hash.Sum(nil)
|
||||
}
|
||||
|
||||
const timeFmt = "2006-01-02 15:04:05"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue