internal: add more tracing for states
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
3e70b6443a
commit
220f123b29
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
|
@ -19,6 +20,11 @@ func (a *Application) redeemCallback(r *http.Request, states []string) (*Claims,
|
|||
found = true
|
||||
}
|
||||
}
|
||||
a.log.WithFields(log.Fields{
|
||||
"states": states,
|
||||
"expected": state,
|
||||
"found": found,
|
||||
}).Trace("tracing states")
|
||||
if !found {
|
||||
return nil, fmt.Errorf("invalid state")
|
||||
}
|
||||
|
|
Reference in a new issue