mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
feat: change token ExpiresIn to second (#1550)
This commit is contained in:
@ -31,6 +31,6 @@ func GetCurrentUnixTime() string {
|
||||
|
||||
func IsTokenExpired(createdTime string, expiresIn int) bool {
|
||||
createdTimeObj, _ := time.Parse(time.RFC3339, createdTime)
|
||||
expiresAtObj := createdTimeObj.Add(time.Duration(expiresIn) * time.Minute)
|
||||
expiresAtObj := createdTimeObj.Add(time.Duration(expiresIn) * time.Second)
|
||||
return time.Now().After(expiresAtObj)
|
||||
}
|
||||
|
Reference in New Issue
Block a user