Package com.seeq.link.agent
Class DefaultLoginAuthManager
java.lang.Object
com.seeq.link.agent.DefaultLoginAuthManager
- All Implemented Interfaces:
LoginAuthManager
Manages logging into Seeq's REST API and retrieving an authentication token.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultLoginAuthManager
(AgentKeyReader agentKeyReader, com.seeq.link.sdk.interfaces.SeeqApiProvider apiProvider) -
Method Summary
Modifier and TypeMethodDescriptioncom.seeq.link.sdk.utilities.Event<String>
An event that is triggered when the agent key file is modified or deleted.Log into Seeq and retrieve an authentication token.Returns the full identity path (typically user guid plus any sub-ids), or null if it is not available.void
logout()
Invalidate any stored authentication token so we'll be forced to log in again with fresh credentials.
-
Constructor Details
-
DefaultLoginAuthManager
public DefaultLoginAuthManager(AgentKeyReader agentKeyReader, com.seeq.link.sdk.interfaces.SeeqApiProvider apiProvider)
-
-
Method Details
-
getAgentKeyModifiedEvent
Description copied from interface:LoginAuthManager
An event that is triggered when the agent key file is modified or deleted.- Specified by:
getAgentKeyModifiedEvent
in interfaceLoginAuthManager
-
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 interfaceLoginAuthManager
- Returns:
- An authentication token which can be used to log into Seeq, or null if the login attempt failed.
-
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 interfaceLoginAuthManager
-
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 interfaceLoginAuthManager
-