mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-02 10:52:49 +02:00
authorize: reduce log noise for empty jwt (#793)
This commit is contained in:
parent
748ab836b6
commit
b16bc5e090
2 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,6 @@ func (a *Authorize) okResponse(
|
|||
rawSession []byte,
|
||||
isNewSession bool,
|
||||
) *envoy_service_auth_v2.CheckResponse {
|
||||
|
||||
requestHeaders, err := a.getEnvoyRequestHeaders(rawSession, isNewSession)
|
||||
if err != nil {
|
||||
log.Warn().Err(err).Msg("authorize: error generating new request headers")
|
||||
|
|
|
@ -77,6 +77,10 @@ func getJWTSetCookieHeaders(cookieStore sessions.SessionStore, rawjwt []byte) (m
|
|||
}
|
||||
|
||||
func getJWTClaimHeaders(options config.Options, encoder encoding.MarshalUnmarshaler, rawjwt []byte) (map[string]string, error) {
|
||||
if len(rawjwt) == 0 {
|
||||
return make(map[string]string), nil
|
||||
}
|
||||
|
||||
var claims map[string]jwtClaim
|
||||
err := encoder.Unmarshal(rawjwt, &claims)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue