Question
Drag and Drop
You are developing an ASP.NET MVC application that authenticates a user by using claims-based authentication.The application must:
- Use Windows Identity Foundation 4.5.
- Support the Windows Azure Access Control Service.
(To answer, drag the appropriate code segment to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
- ClaimNames
- ClaimTypes
- IIdentityClaims
- ClaimsIdentity
- ClaimType
- ClaimName
- ClaimType
- ClaimName
using Microsoft.IdentityModel.Claims;
public class IdentityClaim
{
public class IdentityClaim
{
private string _identityProvider;
private string _identotyValue;
public const string ACSProviderClaim = "http://schemas.micorosft.com/accesscontrolservice/...";
public IdentityClaim(
}
private string _identotyValue;
public const string ACSProviderClaim = "http://schemas.micorosft.com/accesscontrolservice/...";
public IdentityClaim(
if (identity !=null) {
}
foreach (varclaim in identity.Claims) {
}
if (claim.
{
if (claim.
{
}
{
_identityValue = claim.Value;
}if (claim.
{
_identityProvider = claim.Value;
}