@@ -21,7 +21,7 @@ import (
2121
2222type OauthProxy struct {
2323 CookieSeed string
24− CookieKey string
24+ CookieName string
2525 CookieDomain string
2626 CookieSecure bool
2727 CookieHttpOnly bool
@@ -109,12 +109,8 @@ func NewOauthProxy(opts *Options, validator func(string) bool) *OauthProxy {
109109 if domain == "" {
110110 domain = "<default>"
111111 }
112− if !opts.CookieHttpsOnly {
113− log.Printf("Warning: cookie-https-only setting is deprecated and will be removed in a future version. use cookie-secure")
114− opts.CookieSecure = opts.CookieHttpsOnly
115− }
116112
117− log.Printf("Cookie settings: name:%s secure (https):%v httponly:%v expiry:%s domain:%s", opts.CookieKey, opts.CookieSecure, opts.CookieHttpOnly, opts.CookieExpire, domain)
113+ log.Printf("Cookie settings: name:%s secure(https):%v httponly:%v expiry:%s domain:%s", opts.CookieName, opts.CookieSecure, opts.CookieHttpOnly, opts.CookieExpire, domain)
118114
119115 var aes_cipher cipher.Block
120116 if opts.PassAccessToken || (opts.CookieRefresh != time.Duration(0)) {
@@ -127,7 +123,7 @@ func NewOauthProxy(opts *Options, validator func(string) bool) *OauthProxy {
127123 }
128124
129125 return &OauthProxy{
130− CookieKey: opts.CookieKey,
126+ CookieName: opts.CookieName,
131127 CookieSeed: opts.CookieSecret,
132128 CookieDomain: opts.CookieDomain,
133129 CookieSecure: opts.CookieSecure,
@@ -208,11 +204,11 @@ func (p *OauthProxy) MakeCookie(req *http.Request, value string, expiration time
208204 }
209205
210206 if value != "" {
211− value = signedCookieValue(p.CookieSeed, p.CookieKey, value)
207+ value = signedCookieValue(p.CookieSeed, p.CookieName, value)
212208 }
213209
214210 return &http.Cookie{
215− Name: p.CookieKey,
211+ Name: p.CookieName,
216212 Value: value,
217213 Path: "/",
218214 Domain: domain,
@@ -233,7 +229,7 @@ func (p *OauthProxy) SetCookie(rw http.ResponseWriter, req *http.Request, val st
233229func (p *OauthProxy) ProcessCookie(rw http.ResponseWriter, req *http.Request) (email, user, access_token string, ok bool) {
234230 var value string
235231 var timestamp time.Time
236− cookie, err := req.Cookie(p.CookieKey)
232+ cookie, err := req.Cookie(p.CookieName)
237233 if err == nil {
238234 value, timestamp, ok = validateCookie(cookie, p.CookieSeed)
239235 if ok {