MutonUfoAI / pgina

pGina fork: Open Source Windows Authentication
http://mutonufoai.github.io/pgina
BSD 3-Clause "New" or "Revised" License
156 stars 39 forks source link

Unable to access local administrator account #167

Open prakashkumar264 opened 3 years ago

prakashkumar264 commented 3 years ago

I am trying to develop my own plugin in pGina and i followed this steps till authenticateUser http://pgina.org/docs/v3.0/plugins.html

public BooleanResult AuthenticateUser(SessionProperties properties) { UserInformation userInfo = properties.GetTrackedSingle();

if (userInfo.Username.Contains("hello") )
{
    // Successful authentication
    return new BooleanResult() { Success = false, Message="Login not allowed"};
}
// Authentication failure
return new BooleanResult() { Success = true };

} So in this I modified if any user with username hello should be denied entry. I have a local admin account on my win 10 with name:hello. So in pgina application, in simulation it denies entry but when I try with windows login, it allows hello to login. But really it should deny the entry. Am i missing something? I want any local user account with string "hello" should be denied entry even if the password is correct.