Which code segments should you include in Target 1, Target 2, Target 3 and Target 4 to build the class constructor?

DRAG DROP

You are developing an ASP.NET MVC application that authenticates a user by using claims-based authentication.

The application must:

You need to implement authentication.

You have the following code:

Which code segments should you include in Target 1, Target 2, Target 3 and Target 4 to build the class constructor? To answer, drag the appropriate code segment to the correct targets 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.

Answer:

Explanation:

public class MyIdentityClaim

{

private string _identityProvider;

private string _identityValue ;

public const string ACSProviderClaim = "http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider";

public MyIdentityClaim(IClaimsIdentity identity)

{

if (identity != null)

{

foreach (var claim in identity.Claims)

{

if (claim.ClaimType == ClaimTypes.NameIdentifier)

{

_identityValue = claim.Value;

}

if (claim.ClaimType == ACSProviderClaim)

{

_identityProvider = claim.Value;

}

}

}

}

References:

Latest 70-486 Dumps Valid Version with 255 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments