How to use the AuthenticationMethod enum to stop non-password logins

0
If, during the PreAuthenticationEvent, I see the AuthenticationMethod to Password, does this block of fail any login attempt that doesn't send in a pasword? I've tried it, and I still hit the Authentication event. I stop it there by checking the password myself, but is there a way to set it so that if a login attempt comes in with no password, that the Authentication event is never hit and it's stopped during PreAuthentication?
 
asked 3/16/2021 3:18:36 PM
add a comment

1 Answers

0
Simply just allow anyone who sends password on PreAuthenticationEvent: public static void PreAuthenticationEvent(object sender, PreAuthenticationEventArgs stuff) { Console.WriteLine(string.Format($"Pre-Authenticating user {stuff.UserName}")); //return null; stuff.Accept(AuthenticationMethods.Password); }
 
answered 3/17/2021 4:27:25 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged ultimate sftp or ask your own question.