Class DefaultLoginAuthManager

java.lang.Object
com.seeq.link.agent.DefaultLoginAuthManager
All Implemented Interfaces:
LoginAuthManager

public class DefaultLoginAuthManager extends Object implements LoginAuthManager
Manages logging into Seeq's REST API and retrieving an authentication token.
  • Constructor Details

    • DefaultLoginAuthManager

      public DefaultLoginAuthManager(AgentKeyReader agentKeyReader, com.seeq.link.sdk.interfaces.SeeqApiProvider apiProvider)
  • Method Details

    • getAgentKeyModifiedEvent

      public com.seeq.link.sdk.utilities.Event<String> getAgentKeyModifiedEvent()
      Description copied from interface: LoginAuthManager
      An event that is triggered when the agent key file is modified or deleted.
      Specified by:
      getAgentKeyModifiedEvent in interface LoginAuthManager
    • getAuthToken

      @Nullable public String getAuthToken()
      Log into Seeq and retrieve an authentication token. To prevent unnecessary requests, the authentication token is stored by this class in memory.
      Specified by:
      getAuthToken in interface LoginAuthManager
      Returns:
      An authentication token which can be used to log into Seeq, or null if the login attempt failed.
    • getIdentityPath

      @Nullable public String getIdentityPath()
      Description copied from interface: LoginAuthManager
      Returns the full identity path (typically user guid plus any sub-ids), or null if it is not available.
      Specified by:
      getIdentityPath in interface LoginAuthManager
    • logout

      public void logout()
      Invalidate any stored authentication token so we'll be forced to log in again with fresh credentials.
      Specified by:
      logout in interface LoginAuthManager