Class JGitPasswordAuthentication

  • All Implemented Interfaces:
    org.apache.sshd.client.auth.UserAuth, org.apache.sshd.client.session.ClientSessionHolder, org.apache.sshd.common.auth.UserAuthInstance<org.apache.sshd.client.session.ClientSession>, org.apache.sshd.common.NamedResource

    public class JGitPasswordAuthentication
    extends org.apache.sshd.client.auth.password.UserAuthPassword
    A password authentication handler that uses the JGitUserInteraction to ask the user for the password. It also respects the NumberOfPasswordPrompts ssh config.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int attempts  
      private int maxAttempts  
      • Fields inherited from class org.apache.sshd.client.auth.password.UserAuthPassword

        NAME
      • Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

        log
      • Fields inherited from interface org.apache.sshd.common.NamedResource

        BY_NAME_COMPARATOR, NAME_EXTRACTOR
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.String getPassword​(org.apache.sshd.client.session.ClientSession session, org.apache.sshd.client.auth.keyboard.UserInteraction interaction)  
      void init​(org.apache.sshd.client.session.ClientSession session, java.lang.String service)  
      protected boolean sendAuthDataRequest​(org.apache.sshd.client.session.ClientSession session, java.lang.String service)  
      • Methods inherited from class org.apache.sshd.client.auth.password.UserAuthPassword

        processAuthDataRequest, sendPassword
      • Methods inherited from class org.apache.sshd.client.auth.AbstractUserAuth

        destroy, getClientSession, getName, getService, getSession, process, toString
      • Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

        getSimplifiedLogger
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • maxAttempts

        private int maxAttempts
      • attempts

        private int attempts
    • Constructor Detail

      • JGitPasswordAuthentication

        public JGitPasswordAuthentication()
    • Method Detail

      • init

        public void init​(org.apache.sshd.client.session.ClientSession session,
                         java.lang.String service)
                  throws java.lang.Exception
        Specified by:
        init in interface org.apache.sshd.client.auth.UserAuth
        Overrides:
        init in class org.apache.sshd.client.auth.password.UserAuthPassword
        Throws:
        java.lang.Exception
      • sendAuthDataRequest

        protected boolean sendAuthDataRequest​(org.apache.sshd.client.session.ClientSession session,
                                              java.lang.String service)
                                       throws java.lang.Exception
        Overrides:
        sendAuthDataRequest in class org.apache.sshd.client.auth.password.UserAuthPassword
        Throws:
        java.lang.Exception
      • getPassword

        private java.lang.String getPassword​(org.apache.sshd.client.session.ClientSession session,
                                             org.apache.sshd.client.auth.keyboard.UserInteraction interaction)