1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

v2.0 & cleanup changes

* bump version to 2.0
* remove --cookie-https-only option
* add windows build to dist.sh
* rename --cookie-key to --cookie-name
This commit is contained in:
Jehiah Czebotar
2015-06-07 23:52:28 -04:00
parent 1946739e98
commit d78aa13464
9 changed files with 27 additions and 34 deletions

View File

@ -193,9 +193,9 @@ func (pat_test *PassAccessTokenTest) getCallbackEndpoint() (http_code int,
}
func (pat_test *PassAccessTokenTest) getRootEndpoint(cookie string) (http_code int, access_token string) {
cookie_key := pat_test.proxy.CookieKey
cookieName := pat_test.proxy.CookieName
var value string
key_prefix := cookie_key + "="
key_prefix := cookieName + "="
for _, field := range strings.Split(cookie, "; ") {
value = strings.TrimPrefix(field, key_prefix)
@ -214,7 +214,7 @@ func (pat_test *PassAccessTokenTest) getRootEndpoint(cookie string) (http_code i
return 0, ""
}
req.AddCookie(&http.Cookie{
Name: cookie_key,
Name: cookieName,
Value: value,
Path: "/",
Expires: time.Now().Add(time.Duration(24)),