Dekoh platform API

com.pramati.bfly.das.api
Class AbstractLoginManager

java.lang.Object
  extended by com.pramati.bfly.das.api.AbstractLoginManager
Direct Known Subclasses:
DekohLoginManager

public abstract class AbstractLoginManager
extends Object


Field Summary
protected  Map localDesktopUsers
           
 
Constructor Summary
protected AbstractLoginManager(File userConfig, NetworkCallbackSource source, LoginClient authClient, SSOLoginClient ssoLoginClient)
           
 
Method Summary
protected  boolean authenticate(HttpServletRequest request, HttpServletResponse response, String dasCookie, boolean forceOnline)
           
protected  boolean authenticate(HttpServletRequest request, HttpServletResponse response, String user, String password, boolean forceOnline)
           
protected  AuthUser authenticateUser(String casRememberCookie)
           
protected  AuthUser authenticateUser(String user, String password)
           
protected  SSOAuthUser authenticateUserWithSSO(String ssoLoginToken)
           
protected  boolean authenticateWithSSO(HttpServletRequest request, HttpServletResponse response, String ssoToken)
           
 boolean deregisterLoginListener(DekohUserListener dekohUserListener)
          Unregisters a already registered DekohUserListener which no more needs callback when DesktopUser logs-in/logs-off.
protected  void doLogout(DesktopUser desktopUser)
           
protected  String generateDasCookie(String casAutoLoginToken)
           
protected  String getActualRequestUrl(HttpServletRequest request)
           
 Set getLocalUserNames()
          To get the list of Desktop UserName's, who have successfully logged into this Dekoh Desktop.
protected  File getUserConfigFile()
           
protected abstract  void postLogin(HttpServletRequest request, HttpServletResponse response, DesktopUser desktopUser)
           
protected abstract  void postLogout(DesktopUser desktopUser)
           
 void refresh(String ssoToken, String userName, ServerFacade.Actions action)
           
 void registerLoginListener(DekohUserListener dekohUserListener)
          Registers a DekohUserListener which needs callback when DesktopUser logs-in/logs-off.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localDesktopUsers

protected final Map localDesktopUsers
Constructor Detail

AbstractLoginManager

protected AbstractLoginManager(File userConfig,
                               NetworkCallbackSource source,
                               LoginClient authClient,
                               SSOLoginClient ssoLoginClient)
Method Detail

registerLoginListener

public void registerLoginListener(DekohUserListener dekohUserListener)
Registers a DekohUserListener which needs callback when DesktopUser logs-in/logs-off.

Parameters:
dekohUserListener - DekohUserListener which needs callback when DesktopUser logs-in/logs-off.

deregisterLoginListener

public boolean deregisterLoginListener(DekohUserListener dekohUserListener)
Unregisters a already registered DekohUserListener which no more needs callback when DesktopUser logs-in/logs-off.

Parameters:
dekohUserListener - DekohUserListener which no more needs callback when DesktopUser logs-in/logs-off.
Returns:
true, if DekohUserListener is succesfully deregistered. else return false.

getLocalUserNames

public final Set getLocalUserNames()
To get the list of Desktop UserName's, who have successfully logged into this Dekoh Desktop.

Returns:
list of DesktopUser names, who have successfully logged into this Dekoh Desktop.

getUserConfigFile

protected final File getUserConfigFile()

authenticate

protected final boolean authenticate(HttpServletRequest request,
                                     HttpServletResponse response,
                                     String user,
                                     String password,
                                     boolean forceOnline)
                              throws IOException,
                                     ProxyAuthenticationFailedException,
                                     CASNotReachableException,
                                     UnconfirmedUserException
Throws:
IOException
ProxyAuthenticationFailedException
CASNotReachableException
UnconfirmedUserException

generateDasCookie

protected String generateDasCookie(String casAutoLoginToken)

authenticate

protected final boolean authenticate(HttpServletRequest request,
                                     HttpServletResponse response,
                                     String dasCookie,
                                     boolean forceOnline)
                              throws IOException,
                                     ProxyAuthenticationFailedException,
                                     CASNotReachableException
Throws:
IOException
ProxyAuthenticationFailedException
CASNotReachableException

authenticateWithSSO

protected final boolean authenticateWithSSO(HttpServletRequest request,
                                            HttpServletResponse response,
                                            String ssoToken)
                                     throws IOException,
                                            ProxyAuthenticationFailedException
Throws:
IOException
ProxyAuthenticationFailedException

refresh

public void refresh(String ssoToken,
                    String userName,
                    ServerFacade.Actions action)
             throws IOException
Throws:
IOException

authenticateUser

protected AuthUser authenticateUser(String casRememberCookie)
                             throws IOException,
                                    UnconfirmedUserException,
                                    InvalidCredentialsException
Throws:
IOException
UnconfirmedUserException
InvalidCredentialsException

authenticateUser

protected AuthUser authenticateUser(String user,
                                    String password)
                             throws IOException,
                                    UnconfirmedUserException,
                                    InvalidCredentialsException
Throws:
IOException
UnconfirmedUserException
InvalidCredentialsException

authenticateUserWithSSO

protected SSOAuthUser authenticateUserWithSSO(String ssoLoginToken)
                                       throws IOException
Throws:
IOException

doLogout

protected void doLogout(DesktopUser desktopUser)

getActualRequestUrl

protected String getActualRequestUrl(HttpServletRequest request)

postLogout

protected abstract void postLogout(DesktopUser desktopUser)

postLogin

protected abstract void postLogin(HttpServletRequest request,
                                  HttpServletResponse response,
                                  DesktopUser desktopUser)
                           throws IOException
Throws:
IOException

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers