pytest-sftpserver icon indicating copy to clipboard operation
pytest-sftpserver copied to clipboard

How to mock wrong credentials?

Open Achilles0509 opened this issue 4 years ago • 0 comments

class AllowAllAuthHandler(ServerInterface):
    def check_auth_none(self, username):
        return AUTH_SUCCESSFUL

    def check_auth_password(self, username, password):
        return AUTH_SUCCESSFUL

    def check_auth_publickey(self, username, key):
        return AUTH_SUCCESSFUL

    def check_channel_request(self, kind, chanid):
        return OPEN_SUCCEEDED

As you can see it allows any username password combinations, so it's difficult to mock wrong credentials.

Achilles0509 avatar Oct 01 '21 15:10 Achilles0509