public class PasswordProviderWrapper extends Object implements RepeatingFilePasswordProvider
RepeatingFilePasswordProvider to our
KeyPasswordProvider API.RepeatingFilePasswordProvider.ResourceDecodeResult| 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(String resourceKey) |
RepeatingFilePasswordProvider.ResourceDecodeResult |
handleDecodeAttemptResult(String resourceKey,
String password,
Exception err)
Invoked to inform the password provider about the decoding result.
|
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(String resourceKey) throws IOException
getPassword in interface org.apache.sshd.common.config.keys.FilePasswordProviderIOExceptionpublic RepeatingFilePasswordProvider.ResourceDecodeResult handleDecodeAttemptResult(String resourceKey, String password, Exception err) throws IOException, GeneralSecurityException
RepeatingFilePasswordProviderhandleDecodeAttemptResult in interface RepeatingFilePasswordProviderresourceKey - The resource key representing the private filepassword - The password that was attemptederr - The attempt result - null for successnull is same as
RepeatingFilePasswordProvider.ResourceDecodeResult.TERMINATE.IOExceptionGeneralSecurityExceptionCopyright © 2018 Eclipse JGit Project. All rights reserved.