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); }
private RmsClientManagerContext(OrganizationId orgId, RmsClientManagerContext.ContextId contextId, string contextValue, Guid transactionId, IADRecipientCache recipientCache, IRmsLatencyTracker latencyTracker) { ArgumentValidator.ThrowIfNull("orgId", orgId); this.orgId = orgId; this.tenantId = RmsClientManagerUtils.GetTenantGuidFromOrgId(this.orgId); this.contextId = contextId; this.contextValue = contextValue; this.transactionId = transactionId; this.recipientCache = recipientCache; this.latencyTracker = (latencyTracker ?? NoopRmsLatencyTracker.Instance); if (this.recipientCache != null && this.recipientCache.ADSession != null) { this.recipientSession = this.recipientCache.ADSession; return; } this.recipientSession = DirectorySessionFactory.Default.GetTenantOrRootOrgRecipientSession(ConsistencyMode.IgnoreInvalid, this.orgId.Equals(OrganizationId.ForestWideOrgId) ? ADSessionSettings.FromRootOrgScopeSet() : ADSessionSettings.FromOrganizationIdWithoutRbacScopesServiceOnly(orgId), 248, ".ctor", "f:\\15.00.1497\\sources\\dev\\data\\src\\storage\\rightsmanagement\\RmsClientManagerContext.cs"); }
public RmsClientManagerContext(OrganizationId orgId, RmsClientManagerContext.ContextId contextId, string contextValue, IADRecipientCache recipientCache, IRmsLatencyTracker latencyTracker, string publishingLicense = null) : this(orgId, contextId, contextValue, Guid.NewGuid(), recipientCache, latencyTracker) { if (!string.IsNullOrEmpty(publishingLicense)) { this.orgId = RmsClientManagerUtils.OrgIdFromPublishingLicenseOrDefault(publishingLicense, orgId, out this.externalDirectoryOrgId); } }
public RmsClientManagerContext(OrganizationId orgId, RmsClientManagerContext.ContextId contextId, string contextValue, IADRecipientCache recipientCache, IRmsLatencyTracker latencyTracker, string publishingLicense, Guid externalDirectoryOrgId) : this(orgId, contextId, contextValue, recipientCache, latencyTracker, publishingLicense) { this.externalDirectoryOrgId = externalDirectoryOrgId; }
public RmsClientManagerContext(OrganizationId orgId, IRmsLatencyTracker latencyTracker = null) : this(orgId, RmsClientManagerContext.ContextId.None, null, Guid.NewGuid(), null, latencyTracker) { }
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; }