disable linter errors by comment

This commit is contained in:
Pascal Fischer 2023-03-31 10:30:05 +02:00
parent ca1dc5ac88
commit 32c96c15b8

View File

@ -98,7 +98,7 @@ func (m *AuthMiddleware) CheckJWTFromRequest(w http.ResponseWriter, r *http.Requ
// If we get here, everything worked and we can set the // If we get here, everything worked and we can set the
// user property in context. // user property in context.
newRequest := r.WithContext(context.WithValue(r.Context(), userProperty, validatedToken)) // nolint newRequest := r.WithContext(context.WithValue(r.Context(), userProperty, validatedToken)) //nolint
// Update the current request with the new context information. // Update the current request with the new context information.
*r = *newRequest *r = *newRequest
return nil return nil
@ -134,7 +134,7 @@ func (m *AuthMiddleware) CheckPATFromRequest(w http.ResponseWriter, r *http.Requ
claimMaps[m.audience+jwtclaims.DomainIDSuffix] = account.Domain claimMaps[m.audience+jwtclaims.DomainIDSuffix] = account.Domain
claimMaps[m.audience+jwtclaims.DomainCategorySuffix] = account.DomainCategory claimMaps[m.audience+jwtclaims.DomainCategorySuffix] = account.DomainCategory
jwtToken := jwt.NewWithClaims(jwt.SigningMethodHS256, claimMaps) jwtToken := jwt.NewWithClaims(jwt.SigningMethodHS256, claimMaps)
newRequest := r.WithContext(context.WithValue(r.Context(), jwtclaims.TokenUserProperty, jwtToken)) newRequest := r.WithContext(context.WithValue(r.Context(), jwtclaims.TokenUserProperty, jwtToken)) //nolint
// Update the current request with the new context information. // Update the current request with the new context information.
*r = *newRequest *r = *newRequest
return nil return nil