com.plumtree.uiinfrastructure.login
Class TokenAuthenticator

java.lang.Object
  extended by com.plumtree.uiinfrastructure.login.TokenAuthenticator
All Implemented Interfaces:
IAuthenticator

public class TokenAuthenticator
extends java.lang.Object
implements IAuthenticator

The authentication module for login-token authentication. It handles both the admin token authentication (where the token comes from the URL query string) and the remember-my-password token authentication (where the token comes from the cookie).

Author:
Don Hayler, Julie Fournier (Security Modes), William Adjie-Winoto (Writing this new class)

Method Summary
static TokenAuthenticator GetInstance()
           
 Redirect GetOrSendLoginChallenge(RequestData requestData)
          Login token authentication method does not create challenge.
 LoginResult Login(RequestData requestData)
          Performs the login-token authentication.
 boolean Logout(RequestData requestData)
          Logout is handled by the ILoginControl in the Login activityspace.
 boolean UseThisAuth(RequestData requestData)
          Returns a boolean indicating whether a login token exists in the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

GetInstance

public static TokenAuthenticator GetInstance()

Login

public LoginResult Login(RequestData requestData)
Performs the login-token authentication. The status of successful/failed login will be conveyed in the returned LoginResult object. If no token can be found in the request, this method returns null.

Specified by:
Login in interface IAuthenticator
Parameters:
requestData - the request
Returns:
LoginResult containing the status of the login operation, as well as the supporting information, including the generated PTSession, and any Redirect generated by Login Action PEI.
See Also:
com.plumtree.uiinfrastructure.login.IAuthenticator#Login(com.plumtree.uiinfrastructure.application.RequestData)

GetOrSendLoginChallenge

public Redirect GetOrSendLoginChallenge(RequestData requestData)
Login token authentication method does not create challenge.

Specified by:
GetOrSendLoginChallenge in interface IAuthenticator
Parameters:
requestData - the request
Returns:
the Redirect to the login page, or null if the login challenge has been sent out directly using the XPResponse in the requestData.
See Also:
com.plumtree.uiinfrastructure.login.IAuthenticator#GetOrSendLoginChallenge(com.plumtree.uiinfrastructure.application.RequestData)

Logout

public boolean Logout(RequestData requestData)
Logout is handled by the ILoginControl in the Login activityspace.

Specified by:
Logout in interface IAuthenticator
Parameters:
requestData - the request
Returns:
a boolean indicating whether the user has been logged out (and/or redirected to a logout URL) or not. If it is true, the Interpreter shall not do any further processing of the request.
See Also:
com.plumtree.uiinfrastructure.login.IAuthenticator#Logout(com.plumtree.uiinfrastructure.application.RequestData)

UseThisAuth

public boolean UseThisAuth(RequestData requestData)
Returns a boolean indicating whether a login token exists in the request.

Specified by:
UseThisAuth in interface IAuthenticator
Returns:
a boolean indicating whether the authentication method is applicable to the request in the requestData
See Also:
com.plumtree.uiinfrastructure.login.IAuthenticator#ShouldUseAuth(com.plumtree.uiinfrastructure.application.RequestData)



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