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)
RepeatingFilePasswordProvider
setAttempts
in interface RepeatingFilePasswordProvider
numberOfPasswordPrompts
- number of times to ask for a password;
IllegalArgumentException
may be thrown if <= 0public int getAttempts()
RepeatingFilePasswordProvider
getAttempts
in interface RepeatingFilePasswordProvider
public 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.FilePasswordProvider
IOException
public 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.FilePasswordProvider
IOException
GeneralSecurityException
Copyright © 2019 Eclipse JGit Project. All rights reserved.