コード例 #1
0
        public async Task <JsonResult> AttemptToAuthenticateUserAsync([FromBody] LoginData authenticationData)
        {
            _logger.LogDebug($"Attempting to authenticate `{authenticationData.Username}`...");
            var wasSuccessful = await _UserAuthenticationService.AuthenticateUserAsync(authenticationData);

            _logger.LogDebug($"Authentication result, wasSuccessful={wasSuccessful}");

            return(new JsonResult(new JObject
            {
                ["success"] = wasSuccessful
            }));
        }