ClaimTypeRequirement.ClaimType Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the claim type that was specified in the constructor.
public:
property System::String ^ ClaimType { System::String ^ get(); };
public string ClaimType { get; }
member this.ClaimType : string
Public ReadOnly Property ClaimType As String
Property Value
The claim type.
Examples
The following code shows how to get this property.
WSFederationHttpBinding binding = new WSFederationHttpBinding();
binding.Security.Message.ClaimTypeRequirements.Add
(new ClaimTypeRequirement
("http://schemas.microsoft.com/ws/2005/05/identity/claims/EmailAddress"));
binding.Security.Message.ClaimTypeRequirements.Add
(new ClaimTypeRequirement
("http://schemas.microsoft.com/ws/2005/05/identity/claims/UserName", true));
ClaimTypeRequirement cr = new ClaimTypeRequirement
("http://schemas.microsoft.com/ws/2005/05/identity/claims/UserName", true);
Console.WriteLine(cr.ClaimType);
Console.WriteLine(cr.IsOptional);
Remarks
This property is a URI that defines the type of a claim. For example, to purchase a product from a Web site, the user must present a valid credit card with a sufficient credit limit. The claim type would be the credit card URI.
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.