Package com.atlassian.bamboo.rest
Class DefaultSessionManager
java.lang.Object
com.atlassian.bamboo.rest.DefaultSessionManager
- All Implemented Interfaces:
SessionManager
This class manages user rest api sessions.
-
Field Summary
Fields inherited from interface com.atlassian.bamboo.rest.SessionManager
ANONYMOUS_USER -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSessionManager(BambooUserManager bambooUserManager) Default constructor that uses the default user timeoutDefaultSessionManager(BambooUserManager bambooUserManager, int sessionTimeout, TimeUnit timeUnit) -
Method Summary
Modifier and TypeMethodDescriptiongetUserNameFromSession(String sessionId) What is the username associated with this session?Allow remote users to login to bamboo, providing them with a session id to pass into remote methods.voidLog users out of the session
-
Constructor Details
-
DefaultSessionManager
Default constructor that uses the default user timeout -
DefaultSessionManager
public DefaultSessionManager(BambooUserManager bambooUserManager, int sessionTimeout, TimeUnit timeUnit)
-
-
Method Details
-
login
Allow remote users to login to bamboo, providing them with a session id to pass into remote methods.- Specified by:
loginin interfaceSessionManager- Parameters:
username- The username we want to login underpassword- The password associatedd with the username- Returns:
- The session id for this user
- Throws:
BambooRemoteException- Failed to login
-
logout
Log users out of the session- Specified by:
logoutin interfaceSessionManager- Parameters:
sessionId- The session identifier
-
getUserNameFromSession
What is the username associated with this session?- Specified by:
getUserNameFromSessionin interfaceSessionManager- Parameters:
sessionId- The session identifier- Returns:
- The session's username
- Throws:
BambooRemoteException- Unknown or timed out session,
-