Check for default jwt
This commit is contained in:
parent
2922db0db9
commit
160da5b246
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,9 @@ func (a *Auth) AuthMiddleware() func(http.Handler) http.Handler {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Auth) initJWT() {
|
func (a *Auth) initJWT() {
|
||||||
|
if string(a.cfg.JWTSecret) == "super secret string" {
|
||||||
|
log.Fatal().Msg("JWT secret is the default!")
|
||||||
|
}
|
||||||
a.jwt = jwtauth.New("HS256", []byte(a.cfg.JWTSecret), nil)
|
a.jwt = jwtauth.New("HS256", []byte(a.cfg.JWTSecret), nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue