Class UserSessionIDCallback
java.lang.Object
de.aristaflow.adept2.base.security.callbacks.UserSessionIDCallback
- All Implemented Interfaces:
Serializable,Callback
A callback to retrieve user session IDs when using the combined
authentication instead of the normal 2-part authentication. The user session
ID is optional, therefore callback handler may ignore this callback or even
throw an
Note that this callback may be used together with an
UnsupportedCallbackException. Note that this callback may be used together with an
OrgPositionChoiceCallback and therefore does not reflect the
selection of the organisational position(s). It is not necessary to set a
user session ID for all agents of this callback.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<QualifiedAgent>The agents for which to retrieve user session IDs.protected final HashMap<QualifiedAgent,String> The session IDs indexed by the corresponding agent. -
Constructor Summary
ConstructorsConstructorDescriptionUserSessionIDCallback(List<QualifiedAgent> agents) Creates a new callback for retrieving user session IDs for session tokens for the designated agents. -
Method Summary
Modifier and TypeMethodDescriptionGets theQualifiedAgents for which to retrieve user session IDs.getUserSessionID(QualifiedAgent agent) Gets the user session ID for the designated agent ornullif this callback does not provide a user session ID for the agent.voidsetUserSessionID(QualifiedAgent agent, String userSessionID) Sets the designated user session ID for the designated agent.
-
Field Details
-
agents
The agents for which to retrieve user session IDs. -
sessionIDs
The session IDs indexed by the corresponding agent.
-
-
Constructor Details
-
UserSessionIDCallback
Creates a new callback for retrieving user session IDs for session tokens for the designated agents.- Parameters:
agents- The agents for which to retrieve user session IDs.
-
-
Method Details
-
getAgents
Gets theQualifiedAgents for which to retrieve user session IDs. There need not be a user session ID for all of these agents, especially since this list does not reflect a previous selection of the organisational position(s).- Returns:
- The agents for which to retrieve user session IDs.
-
setUserSessionID
Sets the designated user session ID for the designated agent. The agent has to be one for which to retrieve a user session ID at all!- Parameters:
agent- The agent for which to set a user session ID.userSessionID- The user session ID for session tokens for the designated agent.- Throws:
IllegalArgumentException- If the designated agent is not one for which this callback tries to retrieve user session IDs, anIllegalArgumentExceptionwill be thrown.
-
getUserSessionID
Gets the user session ID for the designated agent ornullif this callback does not provide a user session ID for the agent.- Parameters:
agent- The agent for which to retrieve a user session ID.- Returns:
- The user session ID for the designated agent or
nullif this callback does not provide a user session ID for the agent.
-