remove JWT from logs

secrets should not be exposed in the logs
This commit is contained in:
David Christofas
2021-03-03 15:30:11 +01:00
parent 0719d18586
commit c532073dd1
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ func OpenIDConnect(opts ...ocisoidc.Option) func(http.Handler) http.Handler {
}
userInfo, err := oidcProvider.UserInfo(customCtx, oauth2.StaticTokenSource(oauth2Token))
if err != nil {
opt.Logger.Error().Err(err).Str("token", string(token)).Msg("Failed to get userinfo")
opt.Logger.Error().Err(err).Msg("Failed to get userinfo")
http.Error(w, ErrInvalidToken.Error(), http.StatusUnauthorized)
return
}