public async Task Can_login_securely()
 {
     using (IActorDbClient client = new ActorDbClient())
     {
         Assert.True(await client.LoginSecureAsync("myuser", "mypass"));
     }
 }
Esempio n. 2
0
 public async Task <IActionResult> LoginAsync([FromBody] LoginModel model)
 {
     using (var client = new ActorDbClient(_settings.Value.Host, _settings.Value.Port, _logger))
     {
         if (!await client.LoginSecureAsync(model.Username, model.Password))
         {
             return(Forbid());
         }
         return(Ok());
     }
 }