public async Task <HttpResponseMessage> LoginAsync(LoginDto loginParameters) { HttpResponseMessage response = await _authApi.Login(loginParameters); if (response.IsSuccessStatusCode) { NotifyAuthenticationStateChanged(GetAuthenticationStateAsync()); } return(response); }
public async Task Authorize(string username, string password) { _preferencesService.SessionInfo = await _authApi.Login(username, password); _preferencesService.User = await _authApi.GetUser(); }