Class ServerUserAuthService

java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.util.closeable.IoBaseCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.server.session.ServerUserAuthService
All Implemented Interfaces:
Closeable, AutoCloseable, Channel, org.apache.sshd.common.Closeable, org.apache.sshd.common.PropertyResolver, Service, org.apache.sshd.common.session.SessionContextHolder, SessionHolder<Session>, ServerSessionHolder

public class ServerUserAuthService extends org.apache.sshd.common.util.closeable.AbstractCloseable implements Service, ServerSessionHolder
Author:
Apache MINA SSHD Project
  • Constructor Details

  • Method Details

    • getWelcomePhase

      public WelcomeBannerPhase getWelcomePhase()
    • start

      public void start()
      Specified by:
      start in interface Service
    • getSession

      public ServerSession getSession()
      Specified by:
      getSession in interface SessionHolder<Session>
    • getServerSession

      public ServerSession getServerSession()
      Specified by:
      getServerSession in interface ServerSessionHolder
      Returns:
      The underlying ServerSession used
    • getProperties

      public Map<String,Object> getProperties()
      Specified by:
      getProperties in interface org.apache.sshd.common.PropertyResolver
    • process

      public void process(int cmd, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception
      Description copied from interface: Service
      Service the request.
      Specified by:
      process in interface Service
      Parameters:
      cmd - The incoming command type
      buffer - The Buffer containing optional command parameters
      Throws:
      Exception - If failed to process the command
    • handleUserAuthRequestMessage

      protected boolean handleUserAuthRequestMessage(ServerSession session, org.apache.sshd.common.util.buffer.Buffer buffer, AtomicReference<Boolean> authHolder) throws Exception
      Throws:
      Exception
    • asyncAuth

      protected void asyncAuth(int cmd, org.apache.sshd.common.util.buffer.Buffer buffer, boolean authed)
    • handleAuthenticationInProgress

      protected void handleAuthenticationInProgress(int cmd, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception
      Throws:
      Exception
    • handleAuthenticationSuccess

      protected void handleAuthenticationSuccess(int cmd, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception
      Throws:
      Exception
    • handleAuthenticationFailure

      protected void handleAuthenticationFailure(int cmd, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception
      Throws:
      Exception
    • sendWelcomeBanner

      public org.apache.sshd.common.io.IoWriteFuture sendWelcomeBanner(ServerSession session) throws IOException
      Sends the welcome banner (if any configured) and if not already invoked
      Parameters:
      session - The ServerSession to send the welcome banner to
      Returns:
      The sent welcome banner IoWriteFuture - null if none sent
      Throws:
      IOException - If failed to send the banner
    • resolveWelcomeBanner

      protected String resolveWelcomeBanner(ServerSession session) throws IOException
      Throws:
      IOException
    • loadWelcomeBanner

      protected String loadWelcomeBanner(ServerSession session, URL url, Charset cs) throws IOException
      Throws:
      IOException
    • getFactoryManager

      public ServerFactoryManager getFactoryManager()