Esempio n. 1
0
        public async Task <bool> LoginAsync(string username, string password)
        {
            var bindResult = await _ldapService.TestCredentialsAsync(username, password);

            if (!bindResult)
            {
                return(false);
            }
            else
            {
                await _sessionStorageService.SetItemAsync("loggedIn", bindResult);

                await _sessionStorageService.SetItemAsync("ldapCredentials", new LdapCredential()
                {
                    UserName = _cryptService.EncryptString(username), Password = _cryptService.EncryptString(password)
                });

                return(true);
            }
        }