public class PasswordProviderWrapper extends Object implements RepeatingFilePasswordProvider
RepeatingFilePasswordProvider to our
KeyPasswordProvider API.| Constructor and Description |
|---|
PasswordProviderWrapper(KeyPasswordProvider delegate) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAttempts()
Gets the maximum number of attempts to get a password that should be
attempted for one identity resource through this provider.
|
String |
getPassword(org.apache.sshd.common.session.SessionContext session,
org.apache.sshd.common.NamedResource resource,
int attemptIndex) |
org.apache.sshd.common.config.keys.FilePasswordProvider.ResourceDecodeResult |
handleDecodeAttemptResult(org.apache.sshd.common.session.SessionContext session,
org.apache.sshd.common.NamedResource resource,
int retryIndex,
String password,
Exception err) |
void |
setAttempts(int numberOfPasswordPrompts)
Define the maximum number of attempts to get a password that should be
attempted for one identity resource through this provider.
|
public PasswordProviderWrapper(@NonNull KeyPasswordProvider delegate)
delegate - public void setAttempts(int numberOfPasswordPrompts)
RepeatingFilePasswordProvidersetAttempts in interface RepeatingFilePasswordProvidernumberOfPasswordPrompts - number of times to ask for a password;
IllegalArgumentException may be thrown if <= 0public int getAttempts()
RepeatingFilePasswordProvidergetAttempts in interface RepeatingFilePasswordProviderpublic String getPassword(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resource, int attemptIndex) throws IOException
getPassword in interface org.apache.sshd.common.config.keys.FilePasswordProviderIOExceptionpublic org.apache.sshd.common.config.keys.FilePasswordProvider.ResourceDecodeResult handleDecodeAttemptResult(org.apache.sshd.common.session.SessionContext session,
org.apache.sshd.common.NamedResource resource,
int retryIndex,
String password,
Exception err)
throws IOException,
GeneralSecurityException
handleDecodeAttemptResult in interface org.apache.sshd.common.config.keys.FilePasswordProviderIOExceptionGeneralSecurityExceptionCopyright © 2019 Eclipse JGit Project. All rights reserved.