问题描述
我正在尝试在 pGina 中开发我自己的插件,我按照以下步骤操作,直到 authenticateUser http://pgina.org/docs/v3.0/plugins.html
public BooleanResult AuthenticateUser(SessionProperties properties)
{
Userinformation userInfo = properties.GetTrackedSingle<Userinformation>();
if (userInfo.Username.Contains("hello") )
{
// Successful authentication
return new BooleanResult() { Success = false,Message="Login not allowed"};
}
// Authentication failure
return new BooleanResult() { Success = true };
}
因此,在此我修改了是否应拒绝任何用户名为 hello 的用户进入。 我的 win 10 上有一个本地管理员帐户,名称为:hello。 所以在 pgina 应用程序中,在模拟中它拒绝进入,但是当我尝试使用 Windows 登录时,它允许你好登录。但实际上它应该拒绝进入。 我错过了什么吗?我希望任何带有字符串“hello”的本地用户帐户即使密码正确也应该被拒绝。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)