Refactoring authentication to support server-side Blazor using a seamless login flow.

This commit is contained in:
Shaun Walker
2019-07-15 08:30:03 -04:00
parent f3c823e667
commit ce069ed45b
28 changed files with 307 additions and 86 deletions

View File

@ -35,8 +35,12 @@ namespace Oqtane.Services
public async Task<User> GetUserAsync(int UserId)
{
List<User> users = await http.GetJsonAsync<List<User>>(apiurl);
return users.Where(item => item.UserId == UserId).FirstOrDefault();
return await http.GetJsonAsync<User>(apiurl + "/" + UserId.ToString());
}
public async Task<User> GetUserAsync(string Username)
{
return await http.GetJsonAsync<User>(apiurl + "/name/" + Username);
}
public async Task AddUserAsync(User user)