2017-03-24 15:35:52 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace OpenAuth.App.SSO
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class PassportLoginRequest
|
|
|
|
|
{
|
2018-04-07 00:36:26 +08:00
|
|
|
|
public string Account { get; set; }
|
2017-03-24 15:35:52 +08:00
|
|
|
|
|
|
|
|
|
public string Password { get; set; }
|
|
|
|
|
|
|
|
|
|
public string AppKey { get; set; }
|
|
|
|
|
|
|
|
|
|
public void Trim()
|
|
|
|
|
{
|
2018-04-07 00:36:26 +08:00
|
|
|
|
if (string.IsNullOrEmpty(Account))
|
2017-03-24 15:35:52 +08:00
|
|
|
|
{
|
|
|
|
|
throw new Exception("用户名不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(Password))
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("密码不能为空");
|
|
|
|
|
}
|
2018-04-07 00:36:26 +08:00
|
|
|
|
Account = Account.Trim();
|
2017-03-24 15:35:52 +08:00
|
|
|
|
Password = Password.Trim();
|
|
|
|
|
if(!string.IsNullOrEmpty(AppKey)) AppKey = AppKey.Trim();
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-07-08 11:28:38 +08:00
|
|
|
|
}
|