コード例 #1
0
ファイル: Program.cs プロジェクト: 396000787/csaa
        private static void LoginIn()
        {
            LoginInParam _LoginInParam = new LoginInParam();

            _LoginInParam.Param1 = "test2";
            _LoginInParam.Param2 = GetBase64String("123456");
            AccountProvider _AccountProvider = new AccountProvider();
            var             result           = _AccountProvider.CheckIn(_LoginInParam);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: 396000787/csaa
        private static void Login()
        {
            AccountProvider _Provider = new AccountProvider();

            byte[]       password = Encoding.UTF8.GetBytes("123456");
            LoginInParam _Param   = new LoginInParam();

            _Param.Param1 = "test1";
            _Param.Param2 = Convert.ToBase64String(password);// "123456"
            _Provider.CheckIn(_Param);
        }
コード例 #3
0
        public HttpResponseMessage CheckIn([FromBody] LoginInParam Param)
        {
            try
            {
                AccountProvider _Provider = new AccountProvider();
                var             result    = _Provider.CheckIn(Param);
                return(Request.CreateResponse(HttpStatusCode.OK, result));
            }
            catch (Exception ex)
            {
                LogFactory _LogFactory = new LogFactory(this.GetType());
                _LogFactory.CreateLog(LogType.Error, "登录认证", "CheckIn", ex);

                return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }