I'm using an IPropertyInspector to validate a supplied token and fetch the corresponding user profile (I throw a Fault Exception if the token is not found or is not valid). I then store this user profile in the OperationContext as per this suggested implementation:(Where to store data for current WCF call? Is ThreadStatic safe?)
In my service implementation class, I'd like the user profile to be a field I can easily access, so my first idea was to populate this field in the constructor, but unfortunately the service class is instantiated before the IPropertyInspector fires. So, as an alternative, is there some event I can subscribe to in the WCF pipeline which happens after the IPropertyInspector has run, but before the operation on my service has been called, in which I can populate this user profile field from the Operation Context?
If not, I'll use RemoteRequestContext.Current.Items["User"] as UserProfile every time I want it, but a field would just be cleaner and more convenient.