Skip to content

Commit

Permalink
fix(lint): fixed lint error causing ci failures
Browse files Browse the repository at this point in the history
  • Loading branch information
brahmlower authored and aeneasr committed Oct 21, 2022
1 parent db9a95b commit 4aab5e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (h *Handler) whoami(w http.ResponseWriter, r *http.Request, ps httprouter.P

// Set userId as the X-Kratos-Authenticated-Identity-Id header.
w.Header().Set("X-Kratos-Authenticated-Identity-Id", s.Identity.ID.String())
w.Header().Set("Ory-Session-Cache-For", fmt.Sprintf("%d", int64(s.ExpiresAt.Sub(time.Now()).Seconds())))
w.Header().Set("Ory-Session-Cache-For", fmt.Sprintf("%d", int64(time.Until(s.ExpiresAt).Seconds())))

if err := h.r.SessionManager().RefreshCookie(r.Context(), w, r, s); err != nil {
h.r.Audit().WithRequest(r).WithError(err).Info("Could not re-issue cookie.")
Expand Down

0 comments on commit 4aab5e0

Please sign in to comment.