summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-03-22 17:50:26 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-03-22 17:50:26 -0700
commitd6f75f0532d71a28a4f55c88d3b59c9760989dd0 (patch)
tree89e4de8b7cbd10f5315485f0837dc60cabc316c8 /src
parent05db508a1e3ed20c397700f6a68ee693ec941f32 (diff)
downloadDotNetOpenAuth-d6f75f0532d71a28a4f55c88d3b59c9760989dd0.zip
DotNetOpenAuth-d6f75f0532d71a28a4f55c88d3b59c9760989dd0.tar.gz
DotNetOpenAuth-d6f75f0532d71a28a4f55c88d3b59c9760989dd0.tar.bz2
Removed the WellKnownClaimTypes class since it was redundant with a .NET ClaimTypes class.
But for now I'm leaving a redesigned WellKnownClaimTypes.cs file there in case we want to bring it back. It's got the claims categorized like the AX extension has for ease-of-use.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/ComponentModel/ClaimTypeUriConverter.cs30
-rw-r--r--src/DotNetOpenAuth/ComponentModel/IssuersUriConverter.cs30
-rw-r--r--src/DotNetOpenAuth/ComponentModel/UriConverter.cs18
-rw-r--r--src/DotNetOpenAuth/DotNetOpenAuth.csproj3
-rw-r--r--src/DotNetOpenAuth/InfoCard/ClaimType.cs6
-rw-r--r--src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs2
-rw-r--r--src/DotNetOpenAuth/InfoCard/Token/Token.cs6
-rw-r--r--src/DotNetOpenAuth/InfoCard/Token/TokenUtility.cs4
-rw-r--r--src/DotNetOpenAuth/InfoCard/WellKnownClaimTypes.cs234
9 files changed, 247 insertions, 86 deletions
diff --git a/src/DotNetOpenAuth/ComponentModel/ClaimTypeUriConverter.cs b/src/DotNetOpenAuth/ComponentModel/ClaimTypeUriConverter.cs
new file mode 100644
index 0000000..d937cdf
--- /dev/null
+++ b/src/DotNetOpenAuth/ComponentModel/ClaimTypeUriConverter.cs
@@ -0,0 +1,30 @@
+//-----------------------------------------------------------------------
+// <copyright file="ClaimTypeUriConverter.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.ComponentModel {
+ using System;
+ using System.IdentityModel.Claims;
+
+ /// <summary>
+ /// A design-time helper to give a Uri property an auto-complete functionality
+ /// listing the URIs in the <see cref="ClaimTypes"/> class.
+ /// </summary>
+ public class ClaimTypeUriConverter : UriConverter {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ClaimTypeUriConverter"/> class.
+ /// </summary>
+ [Obsolete("This class is meant for design-time use within an IDE, and not meant to be used directly by runtime code.")]
+ public ClaimTypeUriConverter() {
+ }
+
+ /// <summary>
+ /// Gets the type to reflect over to extract the well known values.
+ /// </summary>
+ protected override Type WellKnownValuesType {
+ get { return typeof(ClaimTypes); }
+ }
+ }
+}
diff --git a/src/DotNetOpenAuth/ComponentModel/IssuersUriConverter.cs b/src/DotNetOpenAuth/ComponentModel/IssuersUriConverter.cs
new file mode 100644
index 0000000..fde15c7
--- /dev/null
+++ b/src/DotNetOpenAuth/ComponentModel/IssuersUriConverter.cs
@@ -0,0 +1,30 @@
+//-----------------------------------------------------------------------
+// <copyright file="IssuersUriConverter.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.ComponentModel {
+ using System;
+ using DotNetOpenAuth.InfoCard;
+
+ /// <summary>
+ /// A design-time helper to give a Uri property an auto-complete functionality
+ /// listing the URIs in the <see cref="WellKnownIssuers"/> class.
+ /// </summary>
+ public class IssuersUriConverter : UriConverter {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="IssuersUriConverter"/> class.
+ /// </summary>
+ [Obsolete("This class is meant for design-time use within an IDE, and not meant to be used directly by runtime code.")]
+ public IssuersUriConverter() {
+ }
+
+ /// <summary>
+ /// Gets the type to reflect over to extract the well known values.
+ /// </summary>
+ protected override Type WellKnownValuesType {
+ get { return typeof(WellKnownIssuers); }
+ }
+ }
+}
diff --git a/src/DotNetOpenAuth/ComponentModel/UriConverter.cs b/src/DotNetOpenAuth/ComponentModel/UriConverter.cs
index e99cf99..51fd15a 100644
--- a/src/DotNetOpenAuth/ComponentModel/UriConverter.cs
+++ b/src/DotNetOpenAuth/ComponentModel/UriConverter.cs
@@ -17,16 +17,19 @@ namespace DotNetOpenAuth.ComponentModel {
/// A design-time helper to allow controls to have properties
/// of type <see cref="Uri"/>.
/// </summary>
- /// <typeparam name="WellKnownValues">A type to reflect over for suggested values.</typeparam>
- public class UriConverter<WellKnownValues> : ConverterBase<Uri> {
+ public abstract class UriConverter : ConverterBase<Uri> {
/// <summary>
/// Initializes a new instance of the UriConverter class.
/// </summary>
- [Obsolete("This class is meant for design-time use within an IDE, and not meant to be used directly by runtime code.")]
- public UriConverter() {
+ protected UriConverter() {
}
/// <summary>
+ /// Gets the type to reflect over to extract the well known values.
+ /// </summary>
+ protected abstract Type WellKnownValuesType { get; }
+
+ /// <summary>
/// Returns whether the given value object is valid for this type and for the specified context.
/// </summary>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param>
@@ -84,8 +87,11 @@ namespace DotNetOpenAuth.ComponentModel {
/// <returns>An array of the standard claim types.</returns>
[Pure]
protected override ICollection GetStandardValuesForCache() {
- return (from field in typeof(WellKnownValues).GetFields(BindingFlags.Static | BindingFlags.Public)
- select new Uri((string)field.GetValue(null))).ToArray();
+ var fields = from field in this.WellKnownValuesType.GetFields(BindingFlags.Static | BindingFlags.Public)
+ select new Uri((string)field.GetValue(null));
+ var properties = from prop in this.WellKnownValuesType.GetProperties(BindingFlags.Static | BindingFlags.Public)
+ select new Uri((string)prop.GetValue(null, null));
+ return (fields.Concat(properties)).ToArray();
}
}
}
diff --git a/src/DotNetOpenAuth/DotNetOpenAuth.csproj b/src/DotNetOpenAuth/DotNetOpenAuth.csproj
index db9af29..0e580e5 100644
--- a/src/DotNetOpenAuth/DotNetOpenAuth.csproj
+++ b/src/DotNetOpenAuth/DotNetOpenAuth.csproj
@@ -167,7 +167,9 @@
</Reference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="ComponentModel\ClaimTypeUriConverter.cs" />
<Compile Include="ComponentModel\ConverterBase.cs" />
+ <Compile Include="ComponentModel\IssuersUriConverter.cs" />
<Compile Include="ComponentModel\UriConverter.cs" />
<Compile Include="Configuration\AssociationTypeCollection.cs" />
<Compile Include="Configuration\AssociationTypeElement.cs" />
@@ -185,7 +187,6 @@
<Compile Include="InfoCard\ClaimType.cs" />
<Compile Include="InfoCard\ReceivingTokenEventArgs.cs" />
<Compile Include="InfoCard\TokenProcessingErrorEventArgs.cs" />
- <Compile Include="InfoCard\WellKnownClaimTypes.cs" />
<Compile Include="InfoCard\InfoCardImage.cs" />
<Compile Include="InfoCard\InfoCardSelector.cs" />
<Compile Include="InfoCard\InfoCardStrings.Designer.cs">
diff --git a/src/DotNetOpenAuth/InfoCard/ClaimType.cs b/src/DotNetOpenAuth/InfoCard/ClaimType.cs
index 504f32d..978c2dd 100644
--- a/src/DotNetOpenAuth/InfoCard/ClaimType.cs
+++ b/src/DotNetOpenAuth/InfoCard/ClaimType.cs
@@ -7,6 +7,7 @@
namespace DotNetOpenAuth.InfoCard {
using System;
using System.ComponentModel;
+ using System.IdentityModel.Claims;
using System.Web.UI;
/// <summary>
@@ -24,7 +25,10 @@ namespace DotNetOpenAuth.InfoCard {
/// <summary>
/// Gets or sets the URI of a requested claim.
/// </summary>
- [TypeConverter(typeof(ComponentModel.UriConverter<WellKnownClaimTypes>))]
+ /// <remarks>
+ /// For a list of well-known claim type URIs, see the <see cref="ClaimTypes"/> class.
+ /// </remarks>
+ [TypeConverter(typeof(ComponentModel.ClaimTypeUriConverter))]
public Uri Name { get; set; }
/// <summary>
diff --git a/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs b/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs
index 31ae5eb..def4958 100644
--- a/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs
+++ b/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs
@@ -219,7 +219,7 @@ namespace DotNetOpenAuth.InfoCard {
/// </summary>
[Description("When receiving managed cards, this is the only Issuer whose cards will be accepted.")]
[Category(InfoCardCategory), DefaultValue(IssuerDefault)]
- [TypeConverter(typeof(ComponentModel.UriConverter<WellKnownIssuers>))]
+ [TypeConverter(typeof(ComponentModel.IssuersUriConverter))]
public Uri Issuer {
get { return (Uri)this.ViewState[IssuerViewStateKey] ?? new Uri(IssuerDefault); }
set { this.ViewState[IssuerViewStateKey] = value; }
diff --git a/src/DotNetOpenAuth/InfoCard/Token/Token.cs b/src/DotNetOpenAuth/InfoCard/Token/Token.cs
index 09100d9..a7dd0e8 100644
--- a/src/DotNetOpenAuth/InfoCard/Token/Token.cs
+++ b/src/DotNetOpenAuth/InfoCard/Token/Token.cs
@@ -105,9 +105,9 @@ namespace DotNetOpenAuth.InfoCard {
/// </summary>
public string SiteSpecificId {
get {
- Contract.Requires(this.Claims.ContainsKey(WellKnownClaimTypes.Ppid));
- ErrorUtilities.VerifyOperation(this.Claims.ContainsKey(WellKnownClaimTypes.Ppid), InfoCardStrings.PpidClaimRequired);
- return TokenUtility.CalculateSiteSpecificID(this.Claims[WellKnownClaimTypes.Ppid]);
+ Contract.Requires(this.Claims.ContainsKey(ClaimTypes.PPID));
+ ErrorUtilities.VerifyOperation(this.Claims.ContainsKey(ClaimTypes.PPID), InfoCardStrings.PpidClaimRequired);
+ return TokenUtility.CalculateSiteSpecificID(this.Claims[ClaimTypes.PPID]);
}
}
diff --git a/src/DotNetOpenAuth/InfoCard/Token/TokenUtility.cs b/src/DotNetOpenAuth/InfoCard/Token/TokenUtility.cs
index c6009f9..a22949f 100644
--- a/src/DotNetOpenAuth/InfoCard/Token/TokenUtility.cs
+++ b/src/DotNetOpenAuth/InfoCard/Token/TokenUtility.cs
@@ -161,7 +161,7 @@ namespace DotNetOpenAuth.InfoCard {
foreach (ClaimSet cs in authzContext.ClaimSets) {
Claim currentIssuerClaim = GetUniqueRsaClaim(cs.Issuer);
- foreach (Claim c in cs.FindClaims(WellKnownClaimTypes.Ppid, Rights.PossessProperty)) {
+ foreach (Claim c in cs.FindClaims(ClaimTypes.PPID, Rights.PossessProperty)) {
if (null == currentIssuerClaim) {
// Found a claim in a ClaimSet with no RSA issuer.
return null;
@@ -243,7 +243,7 @@ namespace DotNetOpenAuth.InfoCard {
Claim rsa = null;
- foreach (Claim c in cs.FindClaims(WellKnownClaimTypes.Rsa, Rights.PossessProperty)) {
+ foreach (Claim c in cs.FindClaims(ClaimTypes.Rsa, Rights.PossessProperty)) {
if (null == rsa) {
rsa = c;
} else if (!rsa.Equals(c)) {
diff --git a/src/DotNetOpenAuth/InfoCard/WellKnownClaimTypes.cs b/src/DotNetOpenAuth/InfoCard/WellKnownClaimTypes.cs
index 4cd608f..94ebae8 100644
--- a/src/DotNetOpenAuth/InfoCard/WellKnownClaimTypes.cs
+++ b/src/DotNetOpenAuth/InfoCard/WellKnownClaimTypes.cs
@@ -27,13 +27,9 @@ namespace DotNetOpenAuth.InfoCard {
public const string AuthorizationDecision = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authorizationdecision";
/// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country" claim.
- /// </summary>
- public const string Country = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth" claim.
+ /// The date of birth of a subject in a form allowed by the xs:date data type.
/// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth</value>
public const string DateOfBirth = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth";
/// <summary>
@@ -47,63 +43,25 @@ namespace DotNetOpenAuth.InfoCard {
public const string Dns = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dns";
/// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" claim.
- /// </summary>
- public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender" claim.
- /// </summary>
- public const string Gender = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" claim.
- /// </summary>
- public const string GivenName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname";
-
- /// <summary>
/// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/hash" claim.
/// </summary>
public const string Hash = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/hash";
/// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone" claim.
- /// </summary>
- public const string HomePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality" claim.
- /// </summary>
- public const string Locality = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone" claim.
- /// </summary>
- public const string MobilePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" claim.
- /// </summary>
- public const string Name = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name";
-
- /// <summary>
/// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" claim.
/// </summary>
public const string NameIdentifier = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier";
/// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/otherphone" claim.
- /// </summary>
- public const string OtherPhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/otherphone";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/postalcode" claim.
- /// </summary>
- public const string PostalCode = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/postalcode";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier" claim.
+ /// A private personal identifier (PPID) that identifies the subject to a relying party.
/// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier</value>
+ /// <remarks>
+ /// The word “private” is used in the sense that the subject identifier is
+ /// specific to a given relying party and hence private to that relying party.
+ /// A subject's PPID at one relying party cannot be correlated with the subject's
+ /// PPID at another relying party.
+ /// </remarks>
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ppid", Justification = "By design")]
public const string Ppid = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier";
@@ -125,21 +83,6 @@ namespace DotNetOpenAuth.InfoCard {
public const string Spn = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/spn";
/// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/stateorprovince" claim.
- /// </summary>
- public const string StateOrProvince = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/stateorprovince";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress" claim.
- /// </summary>
- public const string StreetAddress = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress";
-
- /// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" claim.
- /// </summary>
- public const string Surname = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname";
-
- /// <summary>
/// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/system" claim.
/// </summary>
public const string System = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/system";
@@ -161,11 +104,6 @@ namespace DotNetOpenAuth.InfoCard {
public const string Uri = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/uri";
/// <summary>
- /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage" claim.
- /// </summary>
- public const string Webpage = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage";
-
- /// <summary>
/// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/x500distinguishedname" claim.
/// </summary>
public const string X500DistinguishedName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/x500distinguishedname";
@@ -175,5 +113,157 @@ namespace DotNetOpenAuth.InfoCard {
/// </summary>
private WellKnownClaimTypes() {
}
+
+ /// <summary>
+ /// Inherent attributes about a personality such as gender and bio.
+ /// </summary>
+ [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Required for desired autocompletion.")]
+ public static class Person {
+ /// <summary>
+ /// Gender of a subject.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender</value>
+ /// <remarks>
+ /// The value of the claim can have any of these exact string values –
+ /// 0 (unspecified) or
+ /// 1 (Male) or
+ /// 2 (Female). Using these values allows them to be language neutral.
+ /// </remarks>
+ public const string Gender = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender";
+ }
+
+ /// <summary>
+ /// Various ways to contact a person.
+ /// </summary>
+ [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Required for desired autocompletion.")]
+ public static class Contact {
+ /// <summary>
+ /// Preferred address for the “To:” field of email to be sent to the subject.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress</value>
+ /// <remarks>
+ /// (mail in inetOrgPerson) Usually of the form @. According to inetOrgPerson using RFC 1274: “This attribute type specifies an electronic mailbox attribute following the syntax specified in RFC 822.”
+ /// </remarks>
+ public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress";
+
+ /// <summary>
+ /// Various types of phone numbers.
+ /// </summary>
+ [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Required for desired autocompletion.")]
+ public static class Phone {
+ /// <summary>
+ /// Primary or home telephone number of a subject.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone</value>
+ /// <remarks>
+ /// According to inetOrgPerson using RFC 1274:
+ /// “This attribute type specifies
+ /// a home telephone number associated with a person.” Attribute values
+ /// should follow the agreed format for international telephone numbers,
+ /// e.g. +44 71 123 4567.
+ /// </remarks>
+ public const string HomePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone";
+
+ /// <summary>
+ /// Mobile telephone number of a subject.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone</value>
+ /// <remarks>
+ /// (mobile in inetOrgPerson) According to inetOrgPerson using RFC 1274: “This attribute type specifies a mobile telephone number associated with a person.” Attribute values should follow the agreed format for international telephone numbers, e.g. +44 71 123 4567.
+ /// </remarks>
+ public const string MobilePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone";
+
+ /// <summary>
+ /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/otherphone" claim.
+ /// </summary>
+ public const string OtherPhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/otherphone";
+ }
+
+ /// <summary>
+ /// The many fields that make up an address.
+ /// </summary>
+ [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Required for desired autocompletion.")]
+ public static class Address {
+ /// <summary>
+ /// Street address component of a subject's address information.
+ /// According to RFC 2256:
+ /// “This attribute contains the physical address of the object to which
+ /// the entry corresponds, such as an address for package delivery.”
+ /// Its content is arbitrary, but typically given as a PO Box number or
+ /// apartment/house number followed by a street name, e.g. 303 Mulberry St.
+ /// (street in RFC 2256)
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress</value>
+ public const string StreetAddress = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress";
+
+ /// <summary>
+ /// Locality component of a subject's address information.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality</value>
+ /// <remarks>
+ /// According to RFC 2256: “This attribute contains the name of a locality, such as a city, county or other geographic region.” e.g. Redmond.
+ /// </remarks>
+ public const string City = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality";
+
+ /// <summary>
+ /// Abbreviation for state or province name of a subject's address information.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/stateorprovince</value>
+ /// <remarks>
+ /// According to RFC 2256: “This attribute contains the full name of a state or province. The values should be coordinated on a national level and if well-known shortcuts exist - like the two-letter state abbreviations in the US – these abbreviations are preferred over longer full names.” e.g. WA.
+ /// </remarks>
+ public const string StateOrProvince = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/stateorprovince";
+
+ /// <summary>
+ /// The "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/postalcode" claim.
+ /// </summary>
+ public const string PostalCode = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/postalcode";
+
+ /// <summary>
+ /// Country of a subject.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country</value>
+ /// <remarks>
+ /// (c in RFC 2256) According to RFC 2256: “This attribute contains a two-letter ISO 3166 country code.”
+ /// </remarks>
+ public const string Country = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country";
+ }
+
+ /// <summary>
+ /// The names a person goes by.
+ /// </summary>
+ [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Required for desired autocompletion.")]
+ public static class Name {
+ /// <summary>
+ /// Preferred name or first name of a subject. According to RFC 2256: “This attribute is used to hold the part of a person’s name which is not their surname nor middle name.”
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname</value>
+ /// <remarks>
+ /// (givenName in RFC 2256)
+ /// </remarks>
+ public const string GivenName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname";
+
+ /// <summary>
+ /// Surname or family name of a subject.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname</value>
+ /// <remarks>
+ /// According to RFC 2256: “This is the X.500 surname attribute which contains the family name of a person.”
+ /// </remarks>
+ public const string Surname = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname";
+ }
+
+ /// <summary>
+ /// Various web addresses connected with this personality.
+ /// </summary>
+ [SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces", Justification = "By design"), SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Required for desired autocompletion.")]
+ public static class Web {
+ /// <summary>
+ /// The Web page of a subject expressed as a URL.
+ /// </summary>
+ /// <value>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage</value>
+ public const string Homepage = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage";
+ }
+ }
}
} \ No newline at end of file