修改BUG:Login Web api对post数据进行检查后再传入Authenticate方法
This commit is contained in:
parent
8a38d58aef
commit
68b5009e97
|
@ -27,7 +27,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
dynamic user = value;
|
dynamic user = value;
|
||||||
string userName = user.userName;
|
string userName = user.userName;
|
||||||
string password = user.password;
|
string password = user.password;
|
||||||
if (UserHelper.Authenticate(userName, password))
|
if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password) && UserHelper.Authenticate(userName, password))
|
||||||
{
|
{
|
||||||
return BootstrapAdminJwtTokenHandler.CreateToken(userName);
|
return BootstrapAdminJwtTokenHandler.CreateToken(userName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue