|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.rest.DefaultSessionManager
public class DefaultSessionManager
This class manages user rest api sessions.
Field Summary | |
---|---|
static long |
DEFAULT_TIMEOUT
|
Fields inherited from interface com.atlassian.bamboo.rest.SessionManager |
---|
ANONYMOUS_USER |
Constructor Summary | |
---|---|
DefaultSessionManager(BambooUserManager bambooUserManager)
Default constructor that uses the default user timeout |
|
DefaultSessionManager(long sessionTimeout,
BambooUserManager bambooUserManager)
Custom constructor to control the length of the timeout |
Method Summary | |
---|---|
java.lang.String |
getUserNameFromSession(java.lang.String sessionId)
What is the username associated with this session? |
java.lang.String |
login(java.lang.String username,
java.lang.String password)
Allow remote users to login to bamboo, providing them with a session id to pass into remote methods. |
void |
logout(java.lang.String sessionId)
Log users out of the session |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static long DEFAULT_TIMEOUT
Constructor Detail |
---|
public DefaultSessionManager(BambooUserManager bambooUserManager)
public DefaultSessionManager(long sessionTimeout, BambooUserManager bambooUserManager)
sessionTimeout
- How much inactive use before the user's session timesout?Method Detail |
---|
public java.lang.String login(java.lang.String username, java.lang.String password) throws BambooRemoteException
login
in interface SessionManager
username
- The username we want to login underpassword
- The password associatedd with the username
BambooRemoteException
- Failed to loginpublic void logout(java.lang.String sessionId)
logout
in interface SessionManager
sessionId
- The session identiferpublic java.lang.String getUserNameFromSession(java.lang.String sessionId) throws BambooRemoteException
getUserNameFromSession
in interface SessionManager
sessionId
- The session identifier
BambooRemoteException
- Unknown or timed out session,
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |