string GetValueForClaimRequest(RequestClaim requestClaim, WebUser webUser) { switch (requestClaim.ClaimType) { case Security.ClaimTypes.Name: return webUser.Username; case Security.ClaimTypes.EMail: return webUser.EMail; case Security.ClaimTypes.Role: return webUser.Role; default: throw new FailedRequiredClaimsException(requestClaim.ClaimType); } }
void AuthenticateUser(WebUser webUser) { FormsAuthentication.SetAuthCookie(webUser.Username, false); }