mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-29 11:33:48 +01:00
disable linter errors by comment
This commit is contained in:
parent
ca1dc5ac88
commit
32c96c15b8
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user