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

Remove dead code

This commit is contained in:
Joel Speed
2019-05-07 17:01:52 +01:00
parent c61f3a1c65
commit 37e31b5f09
2 changed files with 2 additions and 115 deletions

View File

@ -646,10 +646,6 @@ func NewProcessCookieTestWithOptionsModifiers(modifiers ...OptionsModifier) *Pro
}, modifiers...)
}
func (p *ProcessCookieTest) MakeCookie(value string, ref time.Time) []*http.Cookie {
return p.proxy.MakeSessionCookie(p.req, value, p.opts.CookieExpire, ref)
}
func (p *ProcessCookieTest) SaveSession(s *sessions.SessionState) error {
err := p.proxy.SaveSession(p.rw, p.req, s)
if err != nil {
@ -946,11 +942,11 @@ func (st *SignatureTest) MakeRequestWithExpectedKey(method, body, key string) {
state := &sessions.SessionState{
Email: "mbland@acm.org", AccessToken: "my_access_token"}
value, err := proxy.provider.CookieForSession(state, proxy.CookieCipher)
err = proxy.SaveSession(st.rw, req, state)
if err != nil {
panic(err)
}
for _, c := range proxy.MakeSessionCookie(req, value, proxy.CookieExpire, time.Now()) {
for _, c := range st.rw.Result().Cookies() {
req.AddCookie(c)
}
// This is used by the upstream to validate the signature.