Skip to content

Commit

Permalink
Fixing issue where context modifications in authenticators are ignored
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Rodriguez <[email protected]>
  • Loading branch information
rodriguise committed Sep 12, 2019
1 parent 9a7d474 commit a983056
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions middleware/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ func (c *Context) Authorize(request *http.Request, route *MatchedRoute) (interfa
}
}

rCtx = request.Context()

rCtx = stdContext.WithValue(rCtx, ctxSecurityPrincipal, usr)
rCtx = stdContext.WithValue(rCtx, ctxSecurityScopes, route.Authenticator.AllScopes())
return usr, request.WithContext(rCtx), nil
Expand Down

0 comments on commit a983056

Please sign in to comment.