找考题网-背景图
单项选择题

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.FindClaims(ClaimTypes.Dns, Rights.PossessProperty).FirstOrDefault();
B. claims.FindClaims(ClaimTypes.Dns, Rights.Identity).FirstOrDefault();
C. claims.ContainsClaim(Claim.CreateDnsClaim(ClaimTypes.Dns));
D. claims.Equals(ClaimTypes.Dns);

热门试题