com.plumtree.uiinfrastructure.login
Interface ILoginHelper

All Known Implementing Classes:
PTLoginHelper

public interface ILoginHelper

This interface defines the extensible login helper code. This is used by the Interpreter and SSO.


Method Summary
 java.lang.Object AttemptBasicAuthLogin(java.lang.String sEncodedCredentials)
          Attempts to create and connect a new user session.
 java.lang.Object AttemptGuestLogin(int nUserID, java.lang.Object token, ISessionManager session, IApplication application, java.lang.String sRequestURL)
          Multiple-guest-user support.
 java.lang.Object AttemptGuestLogin(java.lang.Object token, ISessionManager session, IApplication application, java.lang.String sRequestURL)
          Attempts to create and connect a new default guest user session.
 java.lang.Object AttemptLogin(java.lang.String sLoginToken, ISessionManager session, IApplication application, java.lang.String sRequestURL, IXPRequest request)
          Attempts to create and connect a new user session.
 java.lang.Object AttemptLogin(java.lang.String sUserName, java.lang.String sPassword, java.lang.Object token, boolean bUseNumericConnect, ISessionManager session, IApplication application, java.lang.String sRequestURL)
          Attempts to create and connect a new user session.
 ILink GetDefaultPageRedirect(ILink suppliedLink, java.lang.Object userSession, AActivitySpace asOwner)
          Call this method to obtain a redirect to the default space.
 ILink GetDefaultPageRedirect(ILink suppliedLink, java.lang.Object userSession, IXPRequest request)
          Call this method to obtain a redirect to the default space.
 java.lang.String GetDetailedFailureMessage(java.lang.Exception exception, ISessionManager subSession, IApplication application)
          This method gets an error message suitable for display to the user from the supplied exception (i.e.
 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 HandleCOMPlusProcessRecycled(java.lang.Object userSession)
          Checks if the current COM process has been recycled - retuns a new session in the new process if it has, otherwise returns null.
 void SetAutologinToken(IWebData oWebData, java.lang.Object oUserSession, int nExpires, boolean bIsPersistentCookie, boolean bIsSecure)
          Call this method to set an autologin token for the user.
 

Method Detail

AttemptLogin

java.lang.Object AttemptLogin(java.lang.String sUserName,
                              java.lang.String sPassword,
                              java.lang.Object token,
                              boolean bUseNumericConnect,
                              ISessionManager session,
                              IApplication application,
                              java.lang.String sRequestURL)
Attempts to create and connect a new user session.

Returns:
a valid userSession

AttemptGuestLogin

java.lang.Object AttemptGuestLogin(java.lang.Object token,
                                   ISessionManager session,
                                   IApplication application,
                                   java.lang.String sRequestURL)
Attempts to create and connect a new default guest user session.

Returns:
a valid guest userSession

AttemptGuestLogin

java.lang.Object AttemptGuestLogin(int nUserID,
                                   java.lang.Object token,
                                   ISessionManager session,
                                   IApplication application,
                                   java.lang.String sRequestURL)
Multiple-guest-user support. Attempts to create a new user session and connect as the given guest user.

Returns:
a valid guest userSession

AttemptLogin

java.lang.Object AttemptLogin(java.lang.String sLoginToken,
                              ISessionManager session,
                              IApplication application,
                              java.lang.String sRequestURL,
                              IXPRequest request)
Attempts to create and connect a new user session. Throws an exception if login fails.

Returns:
a valid user session

AttemptBasicAuthLogin

java.lang.Object AttemptBasicAuthLogin(java.lang.String sEncodedCredentials)
Attempts to create and connect a new user session. This method is used for Basic Auth logins. Unfortunately, in Basic Auth the user name and password are encoded in the character encoding of the client machine, and the server does not know what that is. Therefore we have to guess the appropriate encoding. The user credentials passed to this method need to be unencoded as win-1252, shift-jis, Big5, etc... before they can be used. The credentials are basic auth credentials; user name and password are separated by a colon.

Returns:
a valid userSession

GetUserSessionID

java.lang.String GetUserSessionID(java.lang.Object userSession)
This method gets the user ID from the supplied user session object.

Parameters:
Object - the user session
Returns:
String the user ID (return "" instead of null if necessary)

GetUserSessionName

java.lang.String GetUserSessionName(java.lang.Object userSession)
This method gets the user Name from the supplied user session object.

Parameters:
Object - the user session
Returns:
String the user Name (return "" instead of null if necessary)

GetIsGuestUser

boolean GetIsGuestUser(java.lang.Object userSession)
This method returns whether or not the user is a guest user.

Parameters:
Object - the user session
Returns:
boolean true implies the user is a guest user.

GetDetailedFailureMessage

java.lang.String GetDetailedFailureMessage(java.lang.Exception exception,
                                           ISessionManager subSession,
                                           IApplication application)
This method gets an error message suitable for display to the user from the supplied exception (i.e. localized and without any details that a hacker could exploit, such as whether or not that particular user name is valid).

Parameters:
Exception - the login exception to interpret
ISessionManager - the current subsession to use
IApplication - the application
Returns:
String the error message for the user (return "" instead of null if necessary)

GetDefaultPageRedirect

ILink GetDefaultPageRedirect(ILink suppliedLink,
                             java.lang.Object userSession,
                             AActivitySpace asOwner)
Call this method to obtain a redirect to the default space.

Parameters:
ILink - user supplied link that will get filled in with the proper parameters. (Redirect or ASURL object)
Object - userSession
AActivitySpace -
Returns:
ILink to the default page for this user.

GetDefaultPageRedirect

ILink GetDefaultPageRedirect(ILink suppliedLink,
                             java.lang.Object userSession,
                             IXPRequest request)
Call this method to obtain a redirect to the default space.

Parameters:
ILink - user supplied link that will get filled in with the proper parameters. (Redirect or ASURL object)
Object - userSession
IXPRequest - request
Returns:
ILink to the default page for this user.

SetAutologinToken

void SetAutologinToken(IWebData oWebData,
                       java.lang.Object oUserSession,
                       int nExpires,
                       boolean bIsPersistentCookie,
                       boolean bIsSecure)
Call this method to set an autologin token for the user.

Parameters:
oWebData -
oUserSession -
nExpires - cookie expiration time in seconds. -1 means use default value.
bIsPersistentCookie - false means don't set an expires time (expire at end of session). * @param bIsSecure whether or not the login cookie is secure

HandleCOMPlusProcessRecycled

java.lang.Object HandleCOMPlusProcessRecycled(java.lang.Object userSession)
Checks if the current COM process has been recycled - retuns a new session in the new process if it has, otherwise returns null.

Parameters:
userSession - Current user session
Returns:
An IPTSession created in new COM process with the current user logged in if the current process has been recycled. null if no recycling happened.

GetStyleSheetLinks

HTMLElementCollection GetStyleSheetLinks(java.lang.Object userSession,
                                         AActivitySpace asOwner)
Returns an HTMLElementCollection of style sheet links. A style sheet is named "stylesheetname-language", for instance "mainstyle12-en".

Parameters:
userSession -
AActivitySpace -



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.