Class PasswordProviderWrapper
java.lang.Object
org.eclipse.jgit.internal.transport.sshd.PasswordProviderWrapper
- All Implemented Interfaces:
org.apache.sshd.common.config.keys.FilePasswordProvider
public class PasswordProviderWrapper
extends Object
implements org.apache.sshd.common.config.keys.FilePasswordProvider
A bridge from sshd's
FilePasswordProvider
to our per-session
KeyPasswordProvider
API.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.sshd.common.config.keys.FilePasswordProvider
org.apache.sshd.common.config.keys.FilePasswordProvider.Decoder<T>, org.apache.sshd.common.config.keys.FilePasswordProvider.ResourceDecodeResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Supplier
<KeyPasswordProvider> private static final org.apache.sshd.common.AttributeRepository.AttributeKey
<PasswordProviderWrapper.PerSessionState> Fields inherited from interface org.apache.sshd.common.config.keys.FilePasswordProvider
EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPassword
(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resource, int attemptIndex) getState
(org.apache.sshd.common.session.SessionContext context) 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) private URIish
Creates aURIish
from a given string.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.config.keys.FilePasswordProvider
decode
-
Field Details
-
STATE
private static final org.apache.sshd.common.AttributeRepository.AttributeKey<PasswordProviderWrapper.PerSessionState> STATE -
factory
-
-
Constructor Details
-
PasswordProviderWrapper
Creates a newPasswordProviderWrapper
.- Parameters:
factory
- to use to create per-sessionKeyPasswordProvider
s
-
-
Method Details
-
getState
private PasswordProviderWrapper.PerSessionState getState(org.apache.sshd.common.session.SessionContext context) -
getPassword
public String getPassword(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resource, int attemptIndex) throws IOException - Specified by:
getPassword
in interfaceorg.apache.sshd.common.config.keys.FilePasswordProvider
- Throws:
IOException
-
handleDecodeAttemptResult
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 - Specified by:
handleDecodeAttemptResult
in interfaceorg.apache.sshd.common.config.keys.FilePasswordProvider
- Throws:
IOException
GeneralSecurityException
-
toUri
Creates aURIish
from a given string. TheCredentialsProvider
uses uris as resource identifications.- Parameters:
resourceKey
- to convert- Returns:
- the uri
-