Example #1
0
        public IHttpActionResult UserCredentialsAreValid(
            UserCredentialsModel userCredentials)
        {
            bool result;

            try
            {
                //// get header value(s)
                //var authValues = Request.Headers.Authorization;

                //if (authValues?.Scheme == null || authValues.Parameter == null)
                //{
                //    return BadRequest();
                //}

                //if (!authValues.Scheme.Equals(_webConfigContainer.AuthScheme) ||
                //    !authValues.Parameter.Equals(_webConfigContainer.ApiKey))
                //{
                //    return Unauthorized();
                //}

                result = _loginServices.ValidateUserCredentials(userCredentials);
            }
            catch (Exception oEx)
            {
                return(InternalServerError(oEx));
            }

            return(Ok(result));
        }