public LoginResponse Login(LoginReqeust reqeust, string channel) { return(new LoginResponse { IsLoginSuccess = true, SessionId = channel + "." + reqeust.UserName + "." + reqeust.Password + "." + reqeust.Mchid }); }
public IActionResult Login([FromBody] LoginReqeust reqeust) { bool authorized = true; //Your UAuthentication flow //bool authorized = AuthenticationUser(request.UserName, request.Password); if (authorized) { var token = _tokenHelper.GenerateJWTToken(reqeust.UserName); return(Ok(new { token = token })); } else { return(Unauthorized()); } }