forked from rebus-org/Rebus
-
Notifications
You must be signed in to change notification settings - Fork 0
User context
Mogens Heller Grabe edited this page Aug 20, 2013
·
2 revisions
In a similar way to how Correlation IDs work, a user context may also flow through message handlers - i.e. if the special Headers.UserName
header has been added to a handled message, the header will automatically be transferred to all outgoing messages when they're sent.
An endpoint may have Thread.CurrentPrincipal
automatically set to a GenericPrincipal
containing a GenericIdentity
with the user name by going
Configure.With(...)
.(...)
.Behavior(b => b.SetCurrentPrincipalWhenUserNameHeaderIsPresent())
.CreateBus().Start();