(authenticated bool, cfg config.Config)
| 390 | } |
| 391 | |
| 392 | func sessionStatusPayload(authenticated bool, cfg config.Config) map[string]any { |
| 393 | return map[string]any{ |
| 394 | "authenticated": authenticated, |
| 395 | "authRequired": strings.TrimSpace(cfg.AuthToken) != "", |
| 396 | "supportsSessionLogin": true, |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | func (s *Server) sessionCookie(r *http.Request, token string, expiresAt time.Time) *http.Cookie { |
| 401 | cookie := &http.Cookie{ |
no outgoing calls
no test coverage detected