1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 17:42:48 +00:00

added docker support

This commit is contained in:
2018-05-30 21:23:03 -05:00
parent af8448e028
commit 3d05a49a3e
20 changed files with 125 additions and 196 deletions

View File

@@ -54,7 +54,7 @@ func GetJWT(user discord.User) (string, error) {
}
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
return token.SignedString([]byte(config.Config.JWTKey))
return token.SignedString([]byte(config.Config.JWTSecret))
}
func checkEmailPermissions(email string, emails []string) bool {
@@ -96,7 +96,7 @@ func AuthorizedJWT() gin.HandlerFunc {
// parse and verify token
token, err := jwt.ParseWithClaims(tokenString[1], &CustomClaims{}, func(token *jwt.Token) (interface{}, error) {
return []byte(config.Config.JWTKey), nil
return []byte(config.Config.JWTSecret), nil
})
if err != nil {