System.IdentityModel.Tokens.SecurityToken callerToken = null;
IClaimsPrincipal claimsPrincipal = Thread.CurrentPrincipal as IClaimsPrincipal;
if (claimsPrincipal != null && claimsPrincipal.Identities.Count == 1)
{
callerToken = claimsPrincipal.Identities[0].BootstrapToken;
}
var channelFactory = new ChannelFactory<ICmisFacadeChannel>("XXX");
channelFactory.ConfigureChannelFactory();
ICmisFacadeChannel createChannelActingAs = channelFactory.CreateChannelActingAs(callerToken);
var x = createChannelActingAs.getx();
createChannelActingAs.Close();
Is there way to override ClientBase to achive this?Instead of doing this for every call?