SetCookieToken : set cookie
(w http.ResponseWriter, token string)
| 584 | |
| 585 | // SetCookieToken : set cookie |
| 586 | func 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 | } |
no outgoing calls
no test coverage detected