public interface RepeatingFilePasswordProvider
extends org.apache.sshd.common.config.keys.FilePasswordProvider
FilePasswordProvider
augmented to support repeatedly asking for
passwords.Modifier and Type | Interface and Description |
---|---|
static class |
RepeatingFilePasswordProvider.ResourceDecodeResult
Result value of
handleDecodeAttemptResult(String, String, Exception) . |
Modifier and Type | Method and Description |
---|---|
default int |
getAttempts()
Gets the maximum number of attempts to get a password that should be
attempted for one identity resource through this provider.
|
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.
|
void setAttempts(int numberOfPasswordPrompts)
numberOfPasswordPrompts
- number of times to ask for a password;
IllegalArgumentException
may be thrown if <= 0default int getAttempts()
RepeatingFilePasswordProvider.ResourceDecodeResult handleDecodeAttemptResult(String resourceKey, String password, Exception err) throws IOException, GeneralSecurityException
resourceKey
- The resource key representing the private filepassword
- The password that was attemptederr
- The attempt result - null
for successnull
is same as
RepeatingFilePasswordProvider.ResourceDecodeResult.TERMINATE
.IOException
GeneralSecurityException
Copyright © 2018 Eclipse JGit Project. All rights reserved.