Class BuiltinClientIdentitiesWatcher
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.keyprovider.AbstractKeyPairProvider
-
- org.apache.sshd.client.config.keys.ClientIdentitiesWatcher
-
- org.apache.sshd.client.config.keys.BuiltinClientIdentitiesWatcher
-
- All Implemented Interfaces:
KeyIdentityProvider
,KeyPairProvider
- Direct Known Subclasses:
DefaultClientIdentitiesWatcher
public class BuiltinClientIdentitiesWatcher extends ClientIdentitiesWatcher
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
supportedOnly
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProvider
EMPTY_KEYS_PROVIDER
-
Fields inherited from interface org.apache.sshd.common.keyprovider.KeyPairProvider
ECDSA_SHA2_NISTP256, ECDSA_SHA2_NISTP384, ECDSA_SHA2_NISTP521, EMPTY_KEYPAIR_PROVIDER, SSH_DSS, SSH_DSS_CERT, SSH_ECDSA_SHA2_NISTP256_CERT, SSH_ECDSA_SHA2_NISTP384_CERT, SSH_ECDSA_SHA2_NISTP521_CERT, SSH_ED25519, SSH_ED25519_CERT, SSH_RSA, SSH_RSA_CERT
-
-
Constructor Summary
Constructors Constructor Description BuiltinClientIdentitiesWatcher(java.nio.file.Path keysFolder, boolean supportedOnly, ClientIdentityLoaderHolder loader, FilePasswordProviderHolder provider, boolean strict)
BuiltinClientIdentitiesWatcher(java.nio.file.Path keysFolder, boolean supportedOnly, ClientIdentityLoader loader, FilePasswordProvider provider, boolean strict)
BuiltinClientIdentitiesWatcher(java.nio.file.Path keysFolder, java.util.Collection<java.lang.String> ids, boolean supportedOnly, ClientIdentityLoaderHolder loader, FilePasswordProviderHolder provider, boolean strict)
BuiltinClientIdentitiesWatcher(java.nio.file.Path keysFolder, java.util.Collection<java.lang.String> ids, boolean supportedOnly, ClientIdentityLoader loader, FilePasswordProvider provider, boolean strict)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.nio.file.Path>
getBuiltinIdentitiesPaths(java.nio.file.Path keysFolder, java.util.Collection<java.lang.String> ids)
static java.util.List<java.nio.file.Path>
getDefaultBuiltinIdentitiesPaths(java.nio.file.Path keysFolder)
protected boolean
isSupported(SessionContext session, java.security.KeyPair kp)
boolean
isSupportedOnly()
java.lang.Iterable<java.security.KeyPair>
loadKeys(SessionContext session)
Load available keys.-
Methods inherited from class org.apache.sshd.client.config.keys.ClientIdentitiesWatcher
buildProviders, buildProviders, doGetKeyPairs, loadKeys
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.keyprovider.KeyPairProvider
getKeyTypes, loadKey
-
-
-
-
Constructor Detail
-
BuiltinClientIdentitiesWatcher
public BuiltinClientIdentitiesWatcher(java.nio.file.Path keysFolder, boolean supportedOnly, ClientIdentityLoader loader, FilePasswordProvider provider, boolean strict)
-
BuiltinClientIdentitiesWatcher
public BuiltinClientIdentitiesWatcher(java.nio.file.Path keysFolder, java.util.Collection<java.lang.String> ids, boolean supportedOnly, ClientIdentityLoader loader, FilePasswordProvider provider, boolean strict)
-
BuiltinClientIdentitiesWatcher
public BuiltinClientIdentitiesWatcher(java.nio.file.Path keysFolder, boolean supportedOnly, ClientIdentityLoaderHolder loader, FilePasswordProviderHolder provider, boolean strict)
-
BuiltinClientIdentitiesWatcher
public BuiltinClientIdentitiesWatcher(java.nio.file.Path keysFolder, java.util.Collection<java.lang.String> ids, boolean supportedOnly, ClientIdentityLoaderHolder loader, FilePasswordProviderHolder provider, boolean strict)
-
-
Method Detail
-
isSupportedOnly
public final boolean isSupportedOnly()
-
loadKeys
public java.lang.Iterable<java.security.KeyPair> loadKeys(SessionContext session)
Description copied from interface:KeyIdentityProvider
Load available keys.- Specified by:
loadKeys
in interfaceKeyIdentityProvider
- Overrides:
loadKeys
in classClientIdentitiesWatcher
- Parameters:
session
- TheSessionContext
for invoking this load command - may benull
if not invoked within a session context (e.g., offline tool or session unknown).- Returns:
- an
Iterable
instance of available keys - ignored ifnull
-
isSupported
protected boolean isSupported(SessionContext session, java.security.KeyPair kp)
-
getDefaultBuiltinIdentitiesPaths
public static java.util.List<java.nio.file.Path> getDefaultBuiltinIdentitiesPaths(java.nio.file.Path keysFolder)
-
getBuiltinIdentitiesPaths
public static java.util.List<java.nio.file.Path> getBuiltinIdentitiesPaths(java.nio.file.Path keysFolder, java.util.Collection<java.lang.String> ids)
-
-