Beispiel #1
0
        public async Task <IActionResult> PostPassword([FromBody] PasswordEntity data)
        {
            bool valid = await _pass.validatePassword(data);

            if (valid)
            {
                TokenControl myToken = new TokenControl(_configuration);
                string       token   = myToken.GenerateToken(data.UserId);
                return(Ok(token));
            }

            return(BadRequest());
        }