protected static class SshTestHarness.TestCredentialsProvider extends CredentialsProvider
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<SshTestHarness.LogEntry> |
log |
private java.util.Iterator<java.lang.String> |
strings |
private java.util.List<java.lang.String> |
stringStore |
| Constructor and Description |
|---|
TestCredentialsProvider(java.lang.String... strings) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
get(URIish uri,
CredentialItem... items)
Ask for the credential items to be populated.
|
java.util.List<SshTestHarness.LogEntry> |
getLog() |
boolean |
isInteractive()
Check if the provider is interactive with the end-user.
|
private void |
logItems(URIish uri,
CredentialItem... items) |
boolean |
supports(CredentialItem... items)
Check if the provider can supply the necessary
CredentialItems. |
get, getDefault, isAnyNull, reset, setDefaultprivate final java.util.List<java.lang.String> stringStore
private final java.util.Iterator<java.lang.String> strings
private java.util.List<SshTestHarness.LogEntry> log
public TestCredentialsProvider(java.lang.String... strings)
public boolean isInteractive()
CredentialsProviderisInteractive in class CredentialsProvidertrue if the provider is interactive with the end-user.public boolean supports(CredentialItem... items)
CredentialsProviderCredentialItems.supports in class CredentialsProvideritems - the items the application requires to complete authentication.true if this
CredentialsProvider supports
all of the items supplied.public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem
CredentialsProviderget in class CredentialsProvideruri - the URI of the remote resource that needs authentication.items - the items the application requires to complete authentication.true if the request was successful and values were
supplied; false if the user canceled the request and did
not supply all requested values.UnsupportedCredentialItem - if one of the items supplied is not supported.private void logItems(URIish uri, CredentialItem... items)
public java.util.List<SshTestHarness.LogEntry> getLog()