mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-13 00:58:06 +02:00
proxy: remove unused session unmarshal (#592)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
3e562bbf37
commit
56e3f92181
1 changed files with 1 additions and 6 deletions
|
@ -79,8 +79,7 @@ func (p *Proxy) Verify(verifyOnly bool) http.Handler {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return httputil.NewError(http.StatusBadRequest, err)
|
return httputil.NewError(http.StatusBadRequest, err)
|
||||||
}
|
}
|
||||||
jwt, err := sessions.FromContext(r.Context())
|
if _, err := sessions.FromContext(r.Context()); err != nil {
|
||||||
if err != nil {
|
|
||||||
if verifyOnly {
|
if verifyOnly {
|
||||||
return httputil.NewError(http.StatusUnauthorized, err)
|
return httputil.NewError(http.StatusUnauthorized, err)
|
||||||
}
|
}
|
||||||
|
@ -93,10 +92,6 @@ func (p *Proxy) Verify(verifyOnly bool) http.Handler {
|
||||||
httputil.Redirect(w, r, urlutil.NewSignedURL(p.SharedKey, &authN).String(), http.StatusFound)
|
httputil.Redirect(w, r, urlutil.NewSignedURL(p.SharedKey, &authN).String(), http.StatusFound)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
var s sessions.State
|
|
||||||
if err := p.encoder.Unmarshal([]byte(jwt), &s); err != nil {
|
|
||||||
return httputil.NewError(http.StatusBadRequest, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
r.Host = uri.Host
|
r.Host = uri.Host
|
||||||
if err := p.authorize(w, r); err != nil {
|
if err := p.authorize(w, r); err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue