Class UserAuthPublicKey

    • Constructor Detail

      • UserAuthPublicKey

        public UserAuthPublicKey()
    • Method Detail

      • init

        public void init​(ClientSession session,
                         java.lang.String service)
                  throws java.lang.Exception
        Specified by:
        init in interface UserAuth
        Overrides:
        init in class AbstractUserAuth
        Parameters:
        session - The ClientSession
        service - The requesting service name
        Throws:
        java.lang.Exception - If failed to initialize the mechanism
      • resolveAttemptedPublicKeyIdentity

        protected PublicKeyIdentity resolveAttemptedPublicKeyIdentity​(ClientSession session,
                                                                      java.lang.String service)
                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • appendSignature

        protected byte[] appendSignature​(ClientSession session,
                                         java.lang.String service,
                                         java.lang.String name,
                                         java.lang.String username,
                                         java.lang.String algo,
                                         java.security.PublicKey key,
                                         Buffer buffer)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • signalAuthMethodSuccess

        public void signalAuthMethodSuccess​(ClientSession session,
                                            java.lang.String service,
                                            Buffer buffer)
                                     throws java.lang.Exception
        Description copied from interface: UserAuth
        Signal reception of SSH_MSG_USERAUTH_SUCCESS message
        Specified by:
        signalAuthMethodSuccess in interface UserAuth
        Parameters:
        session - The ClientSession
        service - The requesting service name
        buffer - The Buffer containing the success message (after having consumed the relevant data from it)
        Throws:
        java.lang.Exception - If failed to handle the callback - Note: may cause session close
      • signalAuthMethodFailure

        public void signalAuthMethodFailure​(ClientSession session,
                                            java.lang.String service,
                                            boolean partial,
                                            java.util.List<java.lang.String> serverMethods,
                                            Buffer buffer)
                                     throws java.lang.Exception
        Description copied from interface: UserAuth
        Signals reception of SSH_MSG_USERAUTH_FAILURE message
        Specified by:
        signalAuthMethodFailure in interface UserAuth
        Parameters:
        session - The ClientSession
        service - The requesting service name
        partial - true if some partial authentication success so far
        serverMethods - The List of authentication methods that can continue
        buffer - The Buffer containing the failure message (after having consumed the relevant data from it)
        Throws:
        java.lang.Exception - If failed to handle the callback - Note: may cause session close
      • releaseKeys

        protected void releaseKeys()
                            throws java.io.IOException
        Throws:
        java.io.IOException