Skip to content

How does PasswordExpired event work? #349

Open
@naricc

Description

@naricc

I tried some code like this:

PasswordConnectionInfo passwordConnection = new PasswordConnectionInfo(host, ssh_port, username, password);
passwordConnection.PasswordExpired += new EventHandler<AuthenticationPasswordChangeEventArgs>(this.HandlePasswordExpiredEvent);

With this method as the handler:

     private void HandlePasswordExpiredEvent(object reciever,  AuthenticationPasswordChangeEventArgs args)
        {
            throw new SSHPasswordExpiredException($"Password for user {args.Username} has expired.");
        }

It doesn't seem that HandlePasswordExpiredEvent is ever called, even when the password is expired. Am I misunderstanding how this is supposed to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions