public FederationPartyConfiguration(string federationPartyId, string metadataAddress) { if (String.IsNullOrWhiteSpace(federationPartyId)) { throw new ArgumentNullException("federationParty"); } if (String.IsNullOrWhiteSpace(metadataAddress)) { throw new ArgumentNullException("metadataContext"); } this.FederationPartyId = federationPartyId; this.MetadataAddress = metadataAddress; this.AutomaticRefreshInterval = FederationPartyConfiguration.DefaultAutomaticRefreshInterval; this.RefreshInterval = FederationPartyConfiguration.DefaultRefreshInterval; this.ScopingConfiguration = new ScopingConfiguration(); }
public AuthnRequestConfiguration(EntityDesriptorConfiguration entityDesriptorConfiguration, ScopingConfiguration scopingConfiguration, FederationPartyAuthnRequestConfiguration federationPartyAuthnRequestConfiguration) { if (entityDesriptorConfiguration == null) { throw new ArgumentNullException("entityDesriptorConfiguration"); } if (federationPartyAuthnRequestConfiguration == null) { throw new ArgumentNullException("federationPartyAuthnRequestConfiguration"); } if (federationPartyAuthnRequestConfiguration.RequestedAuthnContextConfiguration == null) { throw new ArgumentNullException("requestedAuthnContextConfiguration"); } this._entityDesriptorConfiguration = entityDesriptorConfiguration; this.EntityId = entityDesriptorConfiguration.EntityId; this.RequestId = String.Format("{0}_{1}", entityDesriptorConfiguration.Id, Guid.NewGuid().ToString()); this.AssertionConsumerServiceIndex = (ushort)entityDesriptorConfiguration.SPSSODescriptors.SelectMany(x => x.AssertionConsumerServices) .Single(x => x.IsDefault.GetValueOrDefault()).Index; this.AudienceRestriction = new List <string> { entityDesriptorConfiguration.EntityId }; this.ForceAuthn = federationPartyAuthnRequestConfiguration.ForceAuthn; this.IsPassive = federationPartyAuthnRequestConfiguration.IsPassive; this.Version = federationPartyAuthnRequestConfiguration.Version; this.EncryptNameId = federationPartyAuthnRequestConfiguration.DefaultNameId.EncryptNameId; this.AllowCreateNameIdPolicy = federationPartyAuthnRequestConfiguration.DefaultNameId.AllowCreate; this.SupportedNameIdentifierFormats = new List <Uri>(); this.DefaultNameIdFormat = federationPartyAuthnRequestConfiguration.DefaultNameId.NameIdFormat; this.RequestedAuthnContextConfiguration = federationPartyAuthnRequestConfiguration.RequestedAuthnContextConfiguration; this.ScopingConfiguration = scopingConfiguration; }