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
Sodelujte z nami v storitvi GitHub
Vir za to vsebino najdete v storitvi GitHub, kjer lahko tudi ustvarite in pregledate težave in zahtevke za uveljavitev sprememb. Če želite več informacij, glejte naš vodnik za sodelavce.