(sid string)
| 122 | } |
| 123 | |
| 124 | func userSessionCacheKey(sid string) string { |
| 125 | digest := common.GenerateHMACWithKey([]byte("user-session-cache-v1:"+common.SessionSecret), sid) |
| 126 | return "auth:session:" + digest |
| 127 | } |
| 128 | |
| 129 | func userSessionCacheDeadline() time.Time { |
| 130 | return time.Now().Add(time.Duration(userCacheTTLSeconds()) * time.Second) |