@@ -6,9 +6,12 @@ import (
|
||||
|
||||
// setSessionCookie sets a session cookie in the response
|
||||
func setSessionCookie(w http.ResponseWriter, sessionID string, cfg AuthConfig) {
|
||||
// Sign the session ID
|
||||
signedValue := signCookieValue(sessionID, cfg.CookieSecret)
|
||||
|
||||
cookie := &http.Cookie{
|
||||
Name: cfg.CookieName,
|
||||
Value: sessionID,
|
||||
Value: signedValue,
|
||||
Path: cfg.CookiePath,
|
||||
Domain: cfg.CookieDomain,
|
||||
Secure: cfg.CookieSecure,
|
||||
|
||||
Reference in New Issue
Block a user