Which code segment should you use to retrieve the claim for validation?

You are creating a Windows Communication Foundation (WCF) service that uses
claims-based authorization. The following code retrieves the correct claim set. var claims =
ServiceSecurityContext.Current. AuthorizationContext.ClaimSets[0]; You need to validate
that the requesting client application has included a valid DNS value in the claim. Which
code segment should you use to retrieve the claim for validation?

You are creating a Windows Communication Foundation (WCF) service that uses
claims-based authorization. The following code retrieves the correct claim set. var claims =
ServiceSecurityContext.Current. AuthorizationContext.ClaimSets[0]; You need to validate
that the requesting client application has included a valid DNS value in the claim. Which
code segment should you use to retrieve the claim for validation?

A.
claims.Equals(ClaimTypes.Dns);

B.
claims.ContainsClairo(Claim.CreateDnsClaim(ClaimTypes.Dns));

C.
claims.FindClaims(ClaimTypes.Dns, Rights.PossessProperty) .FirstOrDefault();

D.
claims.FindClaims(ClaimTypes.Dns, Rights.Identity) .FirstOrDefault();



Leave a Reply 0

Your email address will not be published. Required fields are marked *