do not print out the issuer key in plain text. only used for debugging.

This commit is contained in:
Jason Kulatunga 2023-07-16 09:37:46 -07:00
parent e897ddc3fa
commit 59fd25c8e8
No known key found for this signature in database
1 changed files with 1 additions and 2 deletions

View File

@ -5,7 +5,6 @@ import (
"fmt"
"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/models"
"github.com/golang-jwt/jwt/v4"
"log"
"strings"
"time"
)
@ -16,7 +15,7 @@ func JwtGenerateFastenTokenFromUser(user models.User, issuerSigningKey string) (
if len(strings.TrimSpace(issuerSigningKey)) == 0 {
return "", fmt.Errorf("issuer signing key cannot be empty")
}
log.Printf("ISSUER KEY: " + issuerSigningKey)
//log.Printf("ISSUER KEY: " + issuerSigningKey)
userClaims := UserRegisteredClaims{
RegisteredClaims: jwt.RegisteredClaims{
// In JWT, the expiry time is expressed as unix milliseconds