MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / clearDeviceTrustCookie

Function clearDeviceTrustCookie

server-source-code/internal/handler/auth.go:108–118  ·  view source on GitHub ↗

clearDeviceTrustCookie expires the trust cookie on the client. Called only on explicit revocation paths, never on ordinary logout.

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

106// clearDeviceTrustCookie expires the trust cookie on the client. Called only
107// on explicit revocation paths, never on ordinary logout.
108func clearDeviceTrustCookie(w http.ResponseWriter, r *http.Request) {
109 http.SetCookie(w, &http.Cookie{
110 Name: DeviceTrustCookieName,
111 Value: "",
112 Path: "/",
113 MaxAge: -1,
114 HttpOnly: true,
115 Secure: isSecureRequest(r),
116 SameSite: http.SameSiteLaxMode,
117 })
118}
119
120// LoginRequest is the request body for login.
121type LoginRequest struct {

Callers 4

RevokeMethod · 0.85
RevokeAllMethod · 0.85
ChangePasswordMethod · 0.85
DisableMethod · 0.85

Calls 1

isSecureRequestFunction · 0.85

Tested by

no test coverage detected