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);
正确答案:A
答案解析:有
微信扫一扫手机做题