public IActionResult CreateToken([FromBody] LoginDto login) { IActionResult response = Unauthorized(); if (login != null && LdapHelper.ValidateDomainCredentials(_unitOfWork, login.Username, login.Password)) { var tokenString = BuildToken(login.Username); response = Ok(new { token = tokenString }); } return(response); }