示例#1
0
        public IHttpActionResult Login(LoginDto dto)
        {
            var jwt = JwtHelper.GetJwtResponse(dto.UserName);

            if (!JwtHelper.IsTokenExist(jwt.AccessToken))
            {
                JwtHelper.AddToken(jwt.AccessToken);
            }

            return(Ok(new ResultT <LoginDto>(
                          new LoginDto
            {
                UserName = dto.UserName,
                Password = dto.Password,
                Jwt = jwt
            })
                      ));
        }