diff --git a/services/tokenTools/tokenTools.go b/services/tokenTools/tokenTools.go index ae60e14..aa44e6b 100644 --- a/services/tokenTools/tokenTools.go +++ b/services/tokenTools/tokenTools.go @@ -2,6 +2,7 @@ package tokenTools import ( "crypto/rand" + "encoding/base64" "fmt" jwt "github.com/dgrijalva/jwt-go" @@ -20,7 +21,9 @@ func GenerateSecret() []byte { // InitJWTService generate the secret to verify JWTs and store it in memory func InitTokenToolsService() { hmacSecret = GenerateSecret() - fmt.Println("InitJWTService", hmacSecret) + encodedSecret := base64.StdEncoding.EncodeToString(hmacSecret) + fmt.Println("InitJWTService", encodedSecret) + // TODO: This needs to be replaced with reading rsa keys, there needs to be a automatic generation of these if they do not exist }