feat: add iat to jwt
This commit is contained in:
parent
171b810504
commit
764a7cbdaf
|
@ -15,6 +15,7 @@ func GenerateTokenWithDuration(domain string, privateKey ed25519.PrivateKey, use
|
||||||
"iss": domain,
|
"iss": domain,
|
||||||
"sub": userID,
|
"sub": userID,
|
||||||
"exp": time.Now().Add(duration).Unix(),
|
"exp": time.Now().Add(duration).Unix(),
|
||||||
|
"iat": time.Now().Unix(),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the token
|
// Create the token
|
||||||
|
|
Loading…
Reference in New Issue