2017-02-08 08:37:57 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace OpenAuth.App.SSO
|
2016-07-08 11:28:38 +08:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class PassportLoginRequest
|
|
|
|
|
{
|
|
|
|
|
public string UserName { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Password { get; set; }
|
|
|
|
|
|
|
|
|
|
public string AppKey { get; set; }
|
|
|
|
|
|
|
|
|
|
public void Trim()
|
|
|
|
|
{
|
2017-02-08 08:37:57 +08:00
|
|
|
|
if (string.IsNullOrEmpty(UserName))
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("用户名不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(Password))
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("密码不能为空");
|
|
|
|
|
}
|
2016-07-08 11:28:38 +08:00
|
|
|
|
UserName = UserName.Trim();
|
|
|
|
|
Password = Password.Trim();
|
2016-07-12 12:28:54 +08:00
|
|
|
|
if(!string.IsNullOrEmpty(AppKey)) AppKey = AppKey.Trim();
|
2016-07-08 11:28:38 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|