MCPcopy
hub / github.com/OWASP/Go-SCP / logout

Function logout

src/session-management/session.go:112–120  ·  view source on GitHub ↗

deletes the cookie

(res http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

110
111// deletes the cookie
112func logout(res http.ResponseWriter, req *http.Request) {
113 deleteCookie := http.Cookie{
114 Name: "Auth",
115 Value: "none",
116 Expires: time.Now(),
117 }
118
119 http.SetCookie(res, &deleteCookie)
120}
121
122func main() {
123 http.HandleFunc("/", validate(protectedProfile))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected