summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/middleware/user.go11
-rw-r--r--pkg/authz/check_service.go1
2 files changed, 5 insertions, 7 deletions
diff --git a/app/middleware/user.go b/app/middleware/user.go
index 317671e..0ffc8cf 100644
--- a/app/middleware/user.go
+++ b/app/middleware/user.go
@@ -13,12 +13,11 @@ func User() func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log.WithFields(r.Context(), log.Fields{
- "authorization": r.Header.Get("Authorization"),
- "payload": r.Header.Get("x-id-jwt-payload"),
- "photo": r.Header.Get("x-id-jwt-claim-picture-url"),
- "profile": r.Header.Get("x-id-jwt-claim-profile-url"),
- "sub": r.Header.Get("x-id-jwt-claim-sub"),
- "username": r.Header.Get("x-id-jwt-claim-username"),
+ "payload": r.Header.Get("x-id-jwt-payload"),
+ "photo": r.Header.Get("x-id-jwt-claim-picture-url"),
+ "profile": r.Header.Get("x-id-jwt-claim-profile-url"),
+ "sub": r.Header.Get("x-id-jwt-claim-sub"),
+ "username": r.Header.Get("x-id-jwt-claim-username"),
})
next.ServeHTTP(w, r.WithContext(cfg.CurrentUser.With(
diff --git a/pkg/authz/check_service.go b/pkg/authz/check_service.go
index 9db32d0..641ba92 100644
--- a/pkg/authz/check_service.go
+++ b/pkg/authz/check_service.go
@@ -40,7 +40,6 @@ func NewCheckService() *CheckService {
}
func (svc *CheckService) Check(ctx context.Context, request *auth.CheckRequest) (*auth.CheckResponse, error) {
- log.WithFields(ctx, log.Fields{"headers": request.Attributes.Request.Http.Headers})
if svc.isAllowed(ctx, request) {
return svc.OK(ctx), nil
}