Exemplo n.º 1
0
    public async Task <HttpResponseMessage> LoginAsync(LoginDto loginParameters)
    {
        HttpResponseMessage response = await _authApi.Login(loginParameters);

        if (response.IsSuccessStatusCode)
        {
            NotifyAuthenticationStateChanged(GetAuthenticationStateAsync());
        }

        return(response);
    }
Exemplo n.º 2
0
        public async Task Authorize(string username, string password)
        {
            _preferencesService.SessionInfo = await _authApi.Login(username, password);

            _preferencesService.User = await _authApi.GetUser();
        }