System\IdentityModel\Configuration\IdentityConfiguration.cs (11)
27public const string DefaultServiceName = ConfigurationStrings.DefaultServiceName;
246element, ConfigurationStrings.ServiceTokenResolver, inner);
259element, ConfigurationStrings.IssuerTokenResolver, inner);
272element, ConfigurationStrings.ClaimsAuthenticationManager, inner);
287element, ConfigurationStrings.IssuerNameRegistry, inner);
450StringComparer.Ordinal.Equals(handlerElementCollection.Name, ConfigurationStrings.DefaultConfigurationElementName))
543if (element.ElementInformation.Properties[ConfigurationStrings.MaximumClockSkew].ValueOrigin != PropertyValueOrigin.Default)
554throw DiagnosticUtility.ThrowHelperConfigurationError(element, ConfigurationStrings.MaximumClockSkew, inner);
714if (element.ElementInformation.Properties[ConfigurationStrings.MaximumClockSkew].ValueOrigin != PropertyValueOrigin.Default)
721throw DiagnosticUtility.ThrowHelperConfigurationError(element, ConfigurationStrings.MaximumClockSkew, inner);
727if (element.ElementInformation.Properties[ConfigurationStrings.SaveBootstrapContext].ValueOrigin != PropertyValueOrigin.Default)
System\IdentityModel\Configuration\IdentityConfigurationElement.cs (44)
15[ConfigurationProperty(ConfigurationStrings.Name, Options = ConfigurationPropertyOptions.IsKey)]
19get { return (string)this[ConfigurationStrings.Name]; }
20set { this[ConfigurationStrings.Name] = value; }
23[ConfigurationProperty(ConfigurationStrings.AudienceUris, IsRequired = false)]
26get { return (AudienceUriElementCollection)this[ConfigurationStrings.AudienceUris]; }
29[ConfigurationProperty(ConfigurationStrings.Caches, IsRequired = false)]
32get { return (IdentityModelCachesElement)this[ConfigurationStrings.Caches]; }
33set { this[ConfigurationStrings.Caches] = value; }
36[ConfigurationProperty(ConfigurationStrings.X509CertificateValidation, IsRequired = false)]
39get { return (X509CertificateValidationElement)this[ConfigurationStrings.X509CertificateValidation]; }
40set { this[ConfigurationStrings.X509CertificateValidation] = value; }
43[ConfigurationProperty(ConfigurationStrings.ClaimsAuthenticationManager, IsRequired = false)]
46get { return (CustomTypeElement)this[ConfigurationStrings.ClaimsAuthenticationManager]; }
47set { this[ConfigurationStrings.ClaimsAuthenticationManager] = value; }
50[ConfigurationProperty(ConfigurationStrings.ClaimsAuthorizationManager, IsRequired = false)]
53get { return (CustomTypeElement)this[ConfigurationStrings.ClaimsAuthorizationManager]; }
54set { this[ConfigurationStrings.ClaimsAuthorizationManager] = value; }
57[ConfigurationProperty(ConfigurationStrings.IssuerNameRegistry, IsRequired = false)]
60get { return (IssuerNameRegistryElement)this[ConfigurationStrings.IssuerNameRegistry]; }
61set { this[ConfigurationStrings.IssuerNameRegistry] = value; }
64[ConfigurationProperty(ConfigurationStrings.IssuerTokenResolver, IsRequired = false)]
67get { return (CustomTypeElement)this[ConfigurationStrings.IssuerTokenResolver]; }
68set { this[ConfigurationStrings.IssuerTokenResolver] = value; }
71[ConfigurationProperty( ConfigurationStrings.MaximumClockSkew, IsRequired = false, DefaultValue = IdentityConfiguration.DefaultMaxClockSkewString )]
73[IdentityModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)]
76get { return (TimeSpan)this[ConfigurationStrings.MaximumClockSkew]; }
77set { this[ConfigurationStrings.MaximumClockSkew] = value; }
80[ConfigurationProperty(ConfigurationStrings.SaveBootstrapContext, IsRequired = false, DefaultValue = false)]
83get { return (bool)this[ConfigurationStrings.SaveBootstrapContext]; }
84set { this[ConfigurationStrings.SaveBootstrapContext] = value; }
87[ConfigurationProperty(ConfigurationStrings.ServiceTokenResolver, IsRequired = false)]
90get { return (CustomTypeElement)this[ConfigurationStrings.ServiceTokenResolver]; }
91set { this[ConfigurationStrings.ServiceTokenResolver] = value; }
94[ConfigurationProperty(ConfigurationStrings.TokenReplayDetection, IsRequired = false)]
97get { return (TokenReplayDetectionElement)this[ConfigurationStrings.TokenReplayDetection]; }
98set { this[ConfigurationStrings.TokenReplayDetection] = value; }
104[ConfigurationProperty(ConfigurationStrings.DefaultCollectionName, Options = ConfigurationPropertyOptions.IsDefaultCollection)]
107get { return (SecurityTokenHandlerSetElementCollection)this[ConfigurationStrings.DefaultConfigurationElementName]; }
113[ConfigurationProperty(ConfigurationStrings.ApplicationService, IsRequired = false)]
116get { return (ApplicationServiceConfigurationElement)this[ConfigurationStrings.ApplicationService]; }
117set { this[ConfigurationStrings.ApplicationService] = value; }
127return ((ElementInformation.Properties[ConfigurationStrings.Name].ValueOrigin != PropertyValueOrigin.Default) ||
135(ElementInformation.Properties[ConfigurationStrings.SaveBootstrapContext].ValueOrigin != PropertyValueOrigin.Default ) ||
136(ElementInformation.Properties[ConfigurationStrings.MaximumClockSkew].ValueOrigin != PropertyValueOrigin.Default) ||
System\IdentityModel\Configuration\SecurityTokenHandlerConfigurationElement.cs (33)
27[ConfigurationProperty( ConfigurationStrings.AudienceUris, IsRequired = false )]
30get { return (AudienceUriElementCollection)this[ConfigurationStrings.AudienceUris]; }
33[ConfigurationProperty(ConfigurationStrings.Caches, IsRequired = false)]
36get { return (IdentityModelCachesElement)this[ConfigurationStrings.Caches]; }
37set { this[ConfigurationStrings.Caches] = value; }
40[ConfigurationProperty(ConfigurationStrings.X509CertificateValidation, IsRequired = false)]
43get { return (X509CertificateValidationElement)this[ConfigurationStrings.X509CertificateValidation]; }
44set { this[ConfigurationStrings.X509CertificateValidation] = value; }
47[ConfigurationProperty( ConfigurationStrings.IssuerNameRegistry, IsRequired = false )]
50get { return (IssuerNameRegistryElement)this[ConfigurationStrings.IssuerNameRegistry]; }
51set { this[ConfigurationStrings.IssuerNameRegistry] = value; }
54[ConfigurationProperty( ConfigurationStrings.IssuerTokenResolver, IsRequired = false )]
57get { return (CustomTypeElement)this[ConfigurationStrings.IssuerTokenResolver]; }
58set { this[ConfigurationStrings.IssuerTokenResolver] = value; }
61[ConfigurationProperty( ConfigurationStrings.Name, IsRequired = false, Options = ConfigurationPropertyOptions.IsKey )]
65get { return (string)this[ConfigurationStrings.Name]; }
66set { this[ConfigurationStrings.Name] = value; }
69[ConfigurationProperty( ConfigurationStrings.SaveBootstrapContext, IsRequired = false, DefaultValue = false )]
72get { return (bool)this[ConfigurationStrings.SaveBootstrapContext]; }
73set { this[ConfigurationStrings.SaveBootstrapContext] = value; }
76[ConfigurationProperty( ConfigurationStrings.MaximumClockSkew, IsRequired = false, DefaultValue = IdentityConfiguration.DefaultMaxClockSkewString )]
78[IdentityModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)]
81get { return (TimeSpan)this[ConfigurationStrings.MaximumClockSkew]; }
82set { this[ConfigurationStrings.MaximumClockSkew] = value; }
85[ConfigurationProperty( ConfigurationStrings.ServiceTokenResolver, IsRequired = false )]
88get { return (CustomTypeElement)this[ConfigurationStrings.ServiceTokenResolver]; }
89set { this[ConfigurationStrings.ServiceTokenResolver] = value; }
92[ConfigurationProperty( ConfigurationStrings.TokenReplayDetection, IsRequired = false )]
95get { return (TokenReplayDetectionElement)this[ConfigurationStrings.TokenReplayDetection]; }
96set { this[ConfigurationStrings.TokenReplayDetection] = value; }
111( ElementInformation.Properties[ConfigurationStrings.Name].ValueOrigin != PropertyValueOrigin.Default ) ||
112( ElementInformation.Properties[ConfigurationStrings.SaveBootstrapContext].ValueOrigin != PropertyValueOrigin.Default ) ||
113( ElementInformation.Properties[ConfigurationStrings.MaximumClockSkew].ValueOrigin != PropertyValueOrigin.Default ) ||
System\IdentityModel\Tokens\ConfigurationBasedIssuerNameRegistry.cs (12)
67if (!StringComparer.Ordinal.Equals(customConfigElement.LocalName, ConfigurationStrings.TrustedIssuers))
69throw DiagnosticUtility.ThrowHelperInvalidOperation(SR.GetString(SR.ID7002, customConfigElement.LocalName, ConfigurationStrings.TrustedIssuers));
77if (StringComparer.Ordinal.Equals(childElement.LocalName, ConfigurationStrings.Add))
79var thumbprintAttribute = childElement.Attributes.GetNamedItem(ConfigurationStrings.Thumbprint);
80var nameAttribute = childElement.Attributes.GetNamedItem(ConfigurationStrings.Name);
88String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0} and {1}", ConfigurationStrings.Thumbprint, ConfigurationStrings.Name)));
97else if (StringComparer.Ordinal.Equals(childElement.LocalName, ConfigurationStrings.Remove))
99if (childElement.Attributes.Count != 1 || !StringComparer.Ordinal.Equals(childElement.Attributes[0].LocalName, ConfigurationStrings.Thumbprint))
105ConfigurationStrings.Thumbprint));
108string thumbprint = childElement.Attributes.GetNamedItem(ConfigurationStrings.Thumbprint).Value;
112else if (StringComparer.Ordinal.Equals(childElement.LocalName, ConfigurationStrings.Clear))
System\IdentityModel\Tokens\SamlSecurityTokenRequirement.cs (24)
56if (element.LocalName != ConfigurationStrings.SamlSecurityTokenRequirement)
58throw DiagnosticUtility.ThrowHelperInvalidOperation(SR.GetString(SR.ID7000, ConfigurationStrings.SamlSecurityTokenRequirement, element.LocalName));
69if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.MapToWindows))
78else if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.IssuerCertificateValidator))
82else if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.IssuerCertificateRevocationMode))
88if (StringComparer.OrdinalIgnoreCase.Equals(revocationModeString, ConfigurationStrings.X509RevocationModeNoCheck))
93else if (StringComparer.OrdinalIgnoreCase.Equals(revocationModeString, ConfigurationStrings.X509RevocationModeOffline))
98else if (StringComparer.OrdinalIgnoreCase.Equals(revocationModeString, ConfigurationStrings.X509RevocationModeOnline))
108else if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.IssuerCertificateValidationMode))
114if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModeChainTrust))
119else if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModePeerOrChainTrust))
124else if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModePeerTrust))
129else if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModeNone))
134else if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModeCustom))
144else if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.IssuerCertificateTrustedStoreLocation))
150if (StringComparer.OrdinalIgnoreCase.Equals(trustedStoreLocationString, ConfigurationStrings.X509TrustedStoreLocationCurrentUser))
155else if (StringComparer.OrdinalIgnoreCase.Equals(trustedStoreLocationString, ConfigurationStrings.X509TrustedStoreLocationLocalMachine))
175if (StringComparer.Ordinal.Equals(childElement.LocalName, ConfigurationStrings.NameClaimType))
177if (childElement.Attributes.Count != 1 || !StringComparer.Ordinal.Equals(childElement.Attributes[0].LocalName, ConfigurationStrings.Value))
179throw DiagnosticUtility.ThrowHelperInvalidOperation(SR.GetString(SR.ID7001, String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}/{1}", element.LocalName, childElement.LocalName), ConfigurationStrings.Value));
183else if (StringComparer.Ordinal.Equals(childElement.LocalName, ConfigurationStrings.RoleClaimType))
185if (childElement.Attributes.Count != 1 || !StringComparer.Ordinal.Equals(childElement.Attributes[0].LocalName, ConfigurationStrings.Value))
187throw DiagnosticUtility.ThrowHelperInvalidOperation(SR.GetString(SR.ID7001, String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}/{1}", element.LocalName, childElement.LocalName), ConfigurationStrings.Value));
193throw DiagnosticUtility.ThrowHelperInvalidOperation(SR.GetString(SR.ID7002, childElement.LocalName, ConfigurationStrings.SamlSecurityTokenRequirement));
System\IdentityModel\Tokens\X509SecurityTokenHandler.cs (17)
109if (!StringComparer.Ordinal.Equals(customConfigElement.LocalName, ConfigurationStrings.X509SecurityTokenHandlerRequirement))
116throw DiagnosticUtility.ThrowHelperInvalidOperation(SR.GetString(SR.ID7026, ConfigurationStrings.X509SecurityTokenHandlerRequirement));
121if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.MapToWindows))
125else if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.X509CertificateValidator))
129else if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.X509CertificateRevocationMode))
135if (StringComparer.OrdinalIgnoreCase.Equals(revocationModeString, ConfigurationStrings.X509RevocationModeNoCheck))
139else if (StringComparer.OrdinalIgnoreCase.Equals(revocationModeString, ConfigurationStrings.X509RevocationModeOffline))
143else if (StringComparer.OrdinalIgnoreCase.Equals(revocationModeString, ConfigurationStrings.X509RevocationModeOnline))
152else if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.X509CertificateValidationMode))
158if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModeChainTrust))
162else if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModePeerOrChainTrust))
166else if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModePeerTrust))
170else if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModeNone))
174else if (StringComparer.OrdinalIgnoreCase.Equals(validationModeString, ConfigurationStrings.X509CertificateValidationModeCustom))
183else if (StringComparer.OrdinalIgnoreCase.Equals(attribute.LocalName, ConfigurationStrings.X509TrustedStoreLocation))
189if (StringComparer.OrdinalIgnoreCase.Equals(trustedStoreLocationString, ConfigurationStrings.X509TrustedStoreLocationCurrentUser))
193else if (StringComparer.OrdinalIgnoreCase.Equals(trustedStoreLocationString, ConfigurationStrings.X509TrustedStoreLocationLocalMachine))