do not print out the issuer key in plain text. only used for debugging.
This commit is contained in:
parent
e897ddc3fa
commit
59fd25c8e8
|
@ -5,7 +5,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/models"
|
"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/models"
|
||||||
"github.com/golang-jwt/jwt/v4"
|
"github.com/golang-jwt/jwt/v4"
|
||||||
"log"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -16,7 +15,7 @@ func JwtGenerateFastenTokenFromUser(user models.User, issuerSigningKey string) (
|
||||||
if len(strings.TrimSpace(issuerSigningKey)) == 0 {
|
if len(strings.TrimSpace(issuerSigningKey)) == 0 {
|
||||||
return "", fmt.Errorf("issuer signing key cannot be empty")
|
return "", fmt.Errorf("issuer signing key cannot be empty")
|
||||||
}
|
}
|
||||||
log.Printf("ISSUER KEY: " + issuerSigningKey)
|
//log.Printf("ISSUER KEY: " + issuerSigningKey)
|
||||||
userClaims := UserRegisteredClaims{
|
userClaims := UserRegisteredClaims{
|
||||||
RegisteredClaims: jwt.RegisteredClaims{
|
RegisteredClaims: jwt.RegisteredClaims{
|
||||||
// In JWT, the expiry time is expressed as unix milliseconds
|
// In JWT, the expiry time is expressed as unix milliseconds
|
||||||
|
|
Loading…
Reference in New Issue