private async Task <ClaimsIdentity> GetIdentity(string email, string password) { var person = await _manager.Get(email, password); if (person == null) { return(null); } var claims = new List <Claim> { new Claim(ClaimsIdentity.DefaultNameClaimType, person.Email), new Claim(ClaimsIdentity.DefaultNameClaimType, person.Phone) }; var claimsIdentity = new ClaimsIdentity(claims, "Token", ClaimsIdentity.DefaultNameClaimType, ClaimsIdentity.DefaultNameClaimType); return(claimsIdentity); }
public async Task <IEnumerable <Stuff> > Index() { return(await _stuffManager.Get()); }