Class PasswordProviderWrapper

  • All Implemented Interfaces:
    org.apache.sshd.common.config.keys.FilePasswordProvider

    public class PasswordProviderWrapper
    extends java.lang.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 Classes 
      Modifier and Type Class Description
      private static class  PasswordProviderWrapper.PerSessionState  
      • Nested classes/interfaces inherited from interface org.apache.sshd.common.config.keys.FilePasswordProvider

        org.apache.sshd.common.config.keys.FilePasswordProvider.ResourceDecodeResult
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPassword​(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resource, int attemptIndex)  
      private PasswordProviderWrapper.PerSessionState 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, java.lang.String password, java.lang.Exception err)  
      private URIish toUri​(java.lang.String resourceKey)
      Creates a URIish from a given string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPassword

        public java.lang.String getPassword​(org.apache.sshd.common.session.SessionContext session,
                                            org.apache.sshd.common.NamedResource resource,
                                            int attemptIndex)
                                     throws java.io.IOException
        Specified by:
        getPassword in interface org.apache.sshd.common.config.keys.FilePasswordProvider
        Throws:
        java.io.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,
                                                                                                                      java.lang.String password,
                                                                                                                      java.lang.Exception err)
                                                                                                               throws java.io.IOException,
                                                                                                                      java.security.GeneralSecurityException
        Specified by:
        handleDecodeAttemptResult in interface org.apache.sshd.common.config.keys.FilePasswordProvider
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
      • toUri

        private URIish toUri​(java.lang.String resourceKey)
        Creates a URIish from a given string. The CredentialsProvider uses uris as resource identifications.
        Parameters:
        resourceKey - to convert
        Returns:
        the uri