mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Fix bug in IsTokenExpired().
This commit is contained in:
parent
940aa2bc2d
commit
0720794e75
@ -32,5 +32,5 @@ func GetCurrentUnixTime() string {
|
||||
func IsTokenExpired(createdTime string, expiresIn int) bool {
|
||||
createdTimeObj, _ := time.Parse(time.RFC3339, createdTime)
|
||||
expiresAtObj := createdTimeObj.Add(time.Duration(expiresIn) * time.Minute)
|
||||
return time.Now().Before(expiresAtObj)
|
||||
return time.Now().After(expiresAtObj)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user