auth

Paddy 2014-11-19 Parent:d43c3fbf00f3 Child:eb3f2938a319

78:a9936cf794ba Go to Latest

auth/oauth2.go

More tests, login redirect bugfix. Add tests for our cookie checking helper and our helper for generating login redirection URIs. Fix a bug where the URL to redirect to was being URL-encoded twice when included in the login redirect URI.

History
     1.1 --- a/oauth2.go	Tue Nov 18 03:28:14 2014 -0500
     1.2 +++ b/oauth2.go	Wed Nov 19 00:17:34 2014 -0500
     1.3 @@ -89,7 +89,7 @@
     1.4  	}
     1.5  	uri := *context.loginURI
     1.6  	q := uri.Query()
     1.7 -	q.Set("from", url.QueryEscape(r.URL.String()))
     1.8 +	q.Set("from", r.URL.String())
     1.9  	uri.RawQuery = q.Encode()
    1.10  	return uri.String()
    1.11  }