Adding admin creation, conf and other items

* Config now added, accessible via config.Config
* Admin can now be generated via a randomized URL if there are no admins
in the system
* Added a shared floor to login attempts to block enumeration attacks
This commit is contained in:
🐙PiperYxzzy
2022-05-03 18:46:22 +02:00
parent 3c1970698b
commit 66c35e7e4a
8 changed files with 134 additions and 22 deletions

View File

@@ -17,7 +17,7 @@ type User struct {
const userJwtDuration = time.Hour * 24
var UserHmac = util.GenerateHmac()
var UserHmac = util.GenerateHmac(64)
func (u *User) GetJwt() (string, int) {
j := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{