MCPcopy Create free account
hub / github.com/Threadfin/Threadfin / SetCookieToken

Function SetCookieToken

src/internal/authentication/authentication.go:586–591  ·  view source on GitHub ↗

SetCookieToken : set cookie

(w http.ResponseWriter, token string)

Source from the content-addressed store, hash-verified

584
585// SetCookieToken : set cookie
586func SetCookieToken(w http.ResponseWriter, token string) http.ResponseWriter {
587 expiration := time.Now().Add(time.Minute * time.Duration(tokenValidity))
588 cookie := http.Cookie{Name: "Token", Value: token, Expires: expiration}
589 http.SetCookie(w, &cookie)
590 return w
591}

Callers 2

WebFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected