MCPcopy
hub / github.com/marmotedu/iam / KeyExpired

Function KeyExpired

internal/pkg/middleware/auth/cache.go:108–114  ·  view source on GitHub ↗

KeyExpired checks if a key has expired, if the value of user.SessionState.Expires is 0, it will be ignored.

(expires int64)

Source from the content-addressed store, hash-verified

106
107// KeyExpired checks if a key has expired, if the value of user.SessionState.Expires is 0, it will be ignored.
108func KeyExpired(expires int64) bool {
109 if expires >= 1 {
110 return time.Now().After(time.Unix(expires, 0))
111 }
112
113 return false
114}

Callers 1

AuthFuncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…