Class MoverProvider


public final class MoverProvider extends NativeAuthenticationProvider
The Class MoverProvider.
  • Field Details

    • _portalSessionTtlMs

      public static final long _portalSessionTtlMs
      TTL for HTTPS portal session tokens (default: 1 hour).
    • PORTAL_SESSION_PREFIX

      public static final String PORTAL_SESSION_PREFIX
      Prefix used in the password field to signal a cached session token.
      See Also:
  • Constructor Details

    • MoverProvider

      public MoverProvider()
  • Method Details

    • getUserForPortalSession

      public static String getUserForPortalSession(String token)
      Look up the cached user name for a portal session token. Returns null if the token is unknown or has expired.
      Parameters:
      token - the session token
      Returns:
      the user name, or null
    • registerPortalSession

      public static String registerPortalSession(String user, IncomingProfile profile)
      Register a portal session token for a user whose credentials have already been validated (e.g. SSH password auth that runs before the SFTP FileSystemProvider is initialised). Returns the token so the caller can pass it as the password in a subsequent getUserSession(String, String, String, String, Closeable) call, avoiding a second TOTP round-trip.
      Parameters:
      user - the user name
      profile - the already-validated incoming profile (ignored — kept for API compatibility)
      Returns:
      the new session token
    • invalidatePortalSession

      public static void invalidatePortalSession(String token)
      Invalidate a portal session token, removing it from the cache immediately. A no-op if the token is unknown.
      Parameters:
      token - the session token to invalidate
    • closeAllIncomingConnections

      public static void closeAllIncomingConnections()
      Close all incoming connections.
    • closeIncomingConnection

      public static boolean closeIncomingConnection(String id)
      Close incoming connection.
      Parameters:
      id - the id
      Returns:
      true, if successful
    • _forceCloseOfDataSpace

      public static void _forceCloseOfDataSpace(MoverProvider.UserDataSpace dataSpace, Closeable closeable)
      Force close of the data space.
      Parameters:
      dataSpace - the data space
      closeable - the closeable
    • getIncomingConnectionIds

      public static String[] getIncomingConnectionIds()
      Gets the incoming connection ids.
      Returns:
      the incoming connection ids
    • getIncomingConnections

      public static List<IncomingConnection> getIncomingConnections()
      Gets the incoming connections.
      Returns:
      the incoming connections
    • isRegistredUser

      public boolean isRegistredUser(String user) throws Exception
      Checks if it is a registred user. Checks if is registred user.
      Specified by:
      isRegistredUser in class NativeAuthenticationProvider
      Parameters:
      user - the user
      Returns:
      true, if is registred user
      Throws:
      Exception - the exception
    • getUserSession

      public UserSession getUserSession(String host, String user, String password, String profile, Closeable closeable) throws Exception
      Called if we have a password. Gets the user session.
      Specified by:
      getUserSession in class NativeAuthenticationProvider
      Parameters:
      host - the host
      user - the user
      password - the password
      profile - the profile
      closeable - the closeable
      Returns:
      the user session
      Throws:
      Exception - the exception
    • getUserSession

      public UserSession getUserSession(String host, String user, ECauthToken token, String profile, Closeable closeable) throws Exception
      Gets the user session. Gets the user session.
      Specified by:
      getUserSession in class NativeAuthenticationProvider
      Parameters:
      host - the host
      user - the user
      token - the token
      profile - the profile
      closeable - the closeable
      Returns:
      the user session
      Throws:
      Exception - the exception
    • getUserSession

      public UserSession getUserSession(String host, String ticket, String profile, Closeable closeable) throws Exception
      Called if we have a ticket. Gets the user session.
      Specified by:
      getUserSession in class NativeAuthenticationProvider
      Parameters:
      host - the host
      ticket - the ticket
      profile - the profile
      closeable - the closeable
      Returns:
      the user session
      Throws:
      Exception - the exception
    • supportTickets

      public boolean supportTickets()
      If tickets are supported then the isPassword method will be called to differentiate the passwords and the tickets. Support tickets.
      Overrides:
      supportTickets in class NativeAuthenticationProvider
      Returns:
      true, if it does support tickets.
    • isPassword

      public boolean isPassword(String user, String password)
      Allow differentiating tickets and passwords. Depending of the result the session will be created with one getUserSession or the other. Checks if is password.
      Overrides:
      isPassword in class NativeAuthenticationProvider
      Parameters:
      user - the user
      password - the password or ticket
      Returns:
      true, if it is a password
    • getRoot

      public String getRoot() throws RemoteException
      Gets the root. Gets the root.
      Specified by:
      getRoot in class NativeAuthenticationProvider
      Returns:
      the root
      Throws:
      RemoteException