public SamlClientCredentials(LicenseIdentity identity, OrganizationId organizationId, Uri targetUri, Offer offer, IRmsLatencyTracker latencyTracker)
 {
     if (identity == null)
     {
         throw new ArgumentNullException("identity");
     }
     if (targetUri == null)
     {
         throw new ArgumentNullException("targetUri");
     }
     if (offer == null)
     {
         throw new ArgumentNullException("offer");
     }
     base.SupportInteractive = false;
     this.Identity           = identity;
     this.OrganizationId     = organizationId;
     this.TargetUri          = targetUri;
     this.Offer = offer;
     base.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
 }
        public static ChannelFactory <IWSCertificationServiceChannel> CreateCertificationChannelFactory(Uri targetUri, EndpointAddress epa, LicenseIdentity identity, OrganizationId organizationId, IRmsLatencyTracker latencyTracker)
        {
            CustomBinding binding = RmsClientManagerUtils.CreateCustomBinding(organizationId, 0);
            ChannelFactory <IWSCertificationServiceChannel> channelFactory = new ChannelFactory <IWSCertificationServiceChannel>(binding, epa);

            channelFactory.Endpoint.Behaviors.Remove(typeof(ClientCredentials));
            channelFactory.Endpoint.Behaviors.Add(new SamlClientCredentials(identity, organizationId, targetUri, Offer.IPCCertificationSTS, latencyTracker));
            return(channelFactory);
        }