public void GivenAuthenticateRequest_ReturnsDto()
            {
                // Arrange
                var request = new AuthenticateRequest
                {
                    EmailAddress = "This is an email address",
                    Password     = "******"
                };

                // Act
                var result = request.ToDto();

                // Assert
                Assert.Multiple(() =>
                {
                    Assert.That(result.EmailAddress, Is.EqualTo(request.EmailAddress));
                    Assert.That(result.PlainTextPassword, Is.EqualTo(request.Password));
                });
            }
        public async Task <IActionResult> AuthenticateAsync([FromBody] AuthenticateRequest request, CancellationToken cancellationToken)
        {
            var authenticated = await _authenticationInstructor.AuthenticateAsync(request.ToDto(), cancellationToken);

            return(Ok(authenticated.ToResponse()));
        }