public Task <bool> IsInRoleAsync(IdentityUser user, string roleName) { return(TaskFactory.StartNew(() => AuthenticatedUserClient.GetRolesByUser(user).Contains(roleName))); }
public Task <IList <string> > GetRolesAsync(IdentityUser user) { return(TaskFactory.StartNew(() => AuthenticatedUserClient.GetRolesByUser(user).ToList() as IList <string>)); }