Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Invalid
-
2.5.1
-
None
-
None
Description
I have a need to have my own AuthFuture implementation. With the current implementation, the authentication timeout keeps running even while the client is asking the user for input, such as for a passphrase for an encrypted private key. If the user doesn't supply the information quickly enough, the session gets closed behind his back when the timeout expires.
So I need an AuthFuture that I can pause while my client program is requesting user input. I do have that actually, but currently I need to subclass ClientUserAuthService (because AbstractClientSession.getUserAuthService() has it as return type) and copy all its code because the creation of the AuthFuture is hard-coded as new DefaultAuthFuture(...) in ClientUserAuthService.auth().
Factoring this out into a separate method protected AuthFuture createAuthFuture(String serviceName, Object lock) would be one way (then I could override without having to copy all the code), but maybe there is a better way, such as a separately configurable AuthFutureFactory.