|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.uiinfrastructure.login.LoginHelper
public final class LoginHelper
This Singleton class controls session login. To implement your own session login code, simply implement an instance of ILoginHelper and initialize this class with your helper using the StaticInit method. All logins should be done through this class, rather than directly calling the custom login code in an ILoginHelper.
Field Summary | |
---|---|
static java.lang.String |
GUEST_USER_NAME
The name of the guest user that will be passed in to the OnBeforeLogin method of the LoginActions PEI. |
static LoginHelper |
INSTANCE
Use this class static to access the one and only instance of LoginHelper. |
static java.lang.String |
LOGIN_TOKEN_COOKIE_DEFUNCT_VALUE
|
static java.lang.String |
LOGIN_TOKEN_COOKIE_NAME
constants for login token cookies. |
static java.lang.String |
PARAM_DOLOGOUT
This string is used by SSO login to determine if the user has clicked the logout link. |
static java.lang.String |
PARAM_DONT_LOGIN_JUST_REDIRECT
Parameter indicates to loginControl that it should not attempt to login, it should just redirect as though it has logged in. |
static java.lang.String |
PARAM_LOGIN
This string is used by SSO login to determine if the user has clicked the login link. |
static java.lang.String |
PARAM_SSOLOGOUT
Parameter that indicates that the login control should show the SSO logout page rather than the standard login page. |
static java.lang.String |
REPLICATION_COOKIE_NAME
constant for replication cookie used in high availability |
Method Summary | |
---|---|
LoginResult |
AttemptBasicAuthLogin(java.lang.String sEncodedCredentials,
ISessionManager subSession,
ISessionManager persistentSubSession,
IApplication application,
java.lang.String strRequestURL,
IXPRequest request,
IWebData webData)
Attempts to create and connect a new user session. |
LoginResult |
AttemptGuestLogin(int nUserID,
java.lang.String strUserName,
java.lang.Object token,
ISessionManager subSession,
ISessionManager persistentSubSession,
IApplication application,
java.lang.String strRequestURL,
IXPRequest request,
IWebData webData)
Attempts to create and connect a new guest user session. |
LoginResult |
AttemptGuestLogin(java.lang.Object token,
ISessionManager subSession,
ISessionManager persistentSubSession,
IApplication application,
java.lang.String strRequestURL,
IXPRequest request,
IWebData webData)
Attempts to create and connect a new user session. |
LoginResult |
AttemptLogin(java.lang.Object userSession,
AActivitySpace asOwner,
IXPRequest request,
IWebData webData)
Handles login tasks for the new session. |
LoginResult |
AttemptLogin(java.lang.Object userSession,
ISessionManager subSession,
ISessionManager persistentSubSession,
IApplication application,
IXPRequest request,
IWebData webData)
Handles login tasks for the new session. |
LoginResult |
AttemptLogin(java.lang.String sLoginToken,
AActivitySpace asOwner,
IXPRequest request,
IWebData webData)
Attempts to create and connect a new user session. |
LoginResult |
AttemptLogin(java.lang.String sLoginToken,
ISessionManager subSession,
ISessionManager persistentSubSession,
IApplication application,
java.lang.String sRequestURL,
IXPRequest request,
IWebData webData)
Attempts to create and connect a new user session. |
LoginResult |
AttemptLogin(java.lang.String strUserName,
java.lang.String strPassword,
java.lang.Object token,
boolean bUseNumericConnect,
AActivitySpace asOwner,
IXPRequest request,
IWebData webData)
Attempts to create and connect a new user session. |
LoginResult |
AttemptLogin(java.lang.String strUserName,
java.lang.String strPassword,
java.lang.Object token,
boolean bUseNumericConnect,
ISessionManager subSession,
ISessionManager persistentSubSession,
IApplication application,
java.lang.String strRequestURL,
IXPRequest request,
IWebData webData)
Attempts to create and connect a new user session. |
void |
ClearAutologinToken(java.lang.String strCurrentRequestURL,
IWebData webData)
Call this method to clear an autologin token cookie from the users session. |
FailedLoginResult |
DoTaskOnFailedLogin(java.lang.String _strUserName,
XPException error,
IXPRequest request,
IWebData webData,
IApplication application,
ISessionManager sessionManager,
ISessionManager persistentSessionManager)
This function will load all of the implemented LoginActions PEIs and then process through them and call the OnFailedLogin function for each one. |
Redirect |
DoTasksBeforeLogout(AActivitySpace asSpace,
IXPRequest request,
IWebData webData)
This function will process all of the OnLogout ILoginActions functions and send the necessary Redirect back to the caller. |
Redirect |
DoTasksBeforeLogout(java.lang.Object userSession,
IXPRequest request,
IWebData webData,
IApplication application,
ISessionManager sessionManager,
ISessionManager persistentSessionManager)
This function will process all of the OnLogout ILoginActions functions and send the necessary Redirect back to the caller. |
java.lang.String |
GetAutologinToken(IXPRequest request)
Call this method to obtain an autologin token from the request. |
ILink |
GetDefaultPageRedirect(ILink suppliedLink,
java.lang.Object userSession,
AActivitySpace asOwner)
Call this method to obtain a redirect to the default space. |
boolean |
GetIsGuestUser(java.lang.Object userSession)
This method returns whether or not the user is a guest user. |
HTMLElementCollection |
GetStyleSheetLinks(java.lang.Object userSession,
AActivitySpace asOwner)
Returns an HTMLElementCollection of style sheet links. |
java.lang.String |
GetUserSessionID(java.lang.Object userSession)
This method gets the user ID from the supplied user session object. |
java.lang.String |
GetUserSessionName(java.lang.Object userSession)
This method gets the user Name from the supplied user session object. |
java.lang.Object |
HandleCOMProcessRecycled(java.lang.Object userSession)
This method is used to handle COM Process Recycling in .NET. |
boolean |
HasValidBasicAuthLogin(java.lang.String sEncodedCredentials)
This method checks whether or not the supplied credentials are valid basic auth credentials, without actually logging the user in completely (a new PTSession is created). |
void |
SetAutologinToken(IWebData oWebData,
IXPRequest xpRequest,
java.lang.Object oUserSession,
int nExpires,
boolean bIsPersistentCookie)
Call this method to set an autologin token for the user. |
static void |
StaticInit(ILoginHelper loginHelper)
Static initialization method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LOGIN_TOKEN_COOKIE_NAME
public static final java.lang.String LOGIN_TOKEN_COOKIE_DEFUNCT_VALUE
public static final java.lang.String REPLICATION_COOKIE_NAME
public static final java.lang.String PARAM_LOGIN
public static final java.lang.String PARAM_DOLOGOUT
public static final java.lang.String PARAM_SSOLOGOUT
public static final java.lang.String PARAM_DONT_LOGIN_JUST_REDIRECT
public static final java.lang.String GUEST_USER_NAME
public static final LoginHelper INSTANCE
Method Detail |
---|
public static final void StaticInit(ILoginHelper loginHelper)
ILoginHelper
- custom login codepublic LoginResult AttemptLogin(java.lang.String strUserName, java.lang.String strPassword, java.lang.Object token, boolean bUseNumericConnect, AActivitySpace asOwner, IXPRequest request, IWebData webData)
public LoginResult AttemptGuestLogin(java.lang.Object token, ISessionManager subSession, ISessionManager persistentSubSession, IApplication application, java.lang.String strRequestURL, IXPRequest request, IWebData webData)
public LoginResult AttemptGuestLogin(int nUserID, java.lang.String strUserName, java.lang.Object token, ISessionManager subSession, ISessionManager persistentSubSession, IApplication application, java.lang.String strRequestURL, IXPRequest request, IWebData webData)
public LoginResult AttemptLogin(java.lang.String strUserName, java.lang.String strPassword, java.lang.Object token, boolean bUseNumericConnect, ISessionManager subSession, ISessionManager persistentSubSession, IApplication application, java.lang.String strRequestURL, IXPRequest request, IWebData webData)
public LoginResult AttemptLogin(java.lang.String sLoginToken, AActivitySpace asOwner, IXPRequest request, IWebData webData)
public LoginResult AttemptLogin(java.lang.String sLoginToken, ISessionManager subSession, ISessionManager persistentSubSession, IApplication application, java.lang.String sRequestURL, IXPRequest request, IWebData webData)
public LoginResult AttemptLogin(java.lang.Object userSession, AActivitySpace asOwner, IXPRequest request, IWebData webData)
Object
- userSession - a pre-connected user session.
public LoginResult AttemptLogin(java.lang.Object userSession, ISessionManager subSession, ISessionManager persistentSubSession, IApplication application, IXPRequest request, IWebData webData)
Object
- userSession - a pre-connected user session.
public boolean HasValidBasicAuthLogin(java.lang.String sEncodedCredentials)
sEncodedCredentials
- the encoded basic auth credentials to validate
public LoginResult AttemptBasicAuthLogin(java.lang.String sEncodedCredentials, ISessionManager subSession, ISessionManager persistentSubSession, IApplication application, java.lang.String strRequestURL, IXPRequest request, IWebData webData)
public java.lang.String GetUserSessionID(java.lang.Object userSession)
Object
- the user session
ILoginHelper.GetUserSessionID(Object)
public java.lang.String GetUserSessionName(java.lang.Object userSession)
Object
- the user session
ILoginHelper.GetUserSessionName(Object)
public boolean GetIsGuestUser(java.lang.Object userSession)
Object
- the user session
ILoginHelper.GetIsGuestUser(Object)
public void SetAutologinToken(IWebData oWebData, IXPRequest xpRequest, java.lang.Object oUserSession, int nExpires, boolean bIsPersistentCookie)
oWebData
- xpRequest
- oUserSession
- nExpires
- cookie and token expiration time in seconds. -1 means use default value.bIsPersistentCookie
- false means don't set an expires time
(expire at end of session).public java.lang.String GetAutologinToken(IXPRequest request)
request
- IXPRequest
public void ClearAutologinToken(java.lang.String strCurrentRequestURL, IWebData webData)
String
- Current Request URL.IWebData
- the page data object for the current request.public ILink GetDefaultPageRedirect(ILink suppliedLink, java.lang.Object userSession, AActivitySpace asOwner)
ILink
- user supplied link that will get filled in with the
proper parameters. (Redirect or ASURL object)Object
- userSessionAActivitySpace
-
public Redirect DoTasksBeforeLogout(AActivitySpace asSpace, IXPRequest request, IWebData webData)
AActivitySpace
-
public Redirect DoTasksBeforeLogout(java.lang.Object userSession, IXPRequest request, IWebData webData, IApplication application, ISessionManager sessionManager, ISessionManager persistentSessionManager)
userSession
- application
- sessionManager
-
public FailedLoginResult DoTaskOnFailedLogin(java.lang.String _strUserName, XPException error, IXPRequest request, IWebData webData, IApplication application, ISessionManager sessionManager, ISessionManager persistentSessionManager)
_strUserName
- - user that has failed the login process.error
- - the exception that caused login to fail, may be nullapplication
- sessionManager
-
public HTMLElementCollection GetStyleSheetLinks(java.lang.Object userSession, AActivitySpace asOwner)
userSession
- AActivitySpace
- public java.lang.Object HandleCOMProcessRecycled(java.lang.Object userSession)
userSession
-
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |