pt.digitalis.dif.controller.security.managers.impl
Class AuthenticationManagerStaticImpl

java.lang.Object
  extended by pt.digitalis.dif.controller.security.managers.impl.AuthenticationManagerStaticImpl
All Implemented Interfaces:
IAuthenticationManager

public class AuthenticationManagerStaticImpl
extends Object
implements IAuthenticationManager

DIF's default implementation of an authentication manager. This implementation will manage authentication records for the DIF localy. No central authentication process is supported.

Author:
Pedro Viegas pviegas@digitalis.pt, Rodrigo Gonçalves rgoncalves@digitalis.pt
Created on:
2007/12/03

Constructor Summary
AuthenticationManagerStaticImpl()
           
 
Method Summary
 void disconnectClient(String clientIdentifier)
          Called to notify the authentication system that the client has disconnected.
 IDIFUser getLoggedUser(String clientIdentifier)
          Searches for the user authenticated for this client in the authentication system and returns it if present.
 boolean isClientLogged(String clientIdentifier)
          Checks if a given user is already authenticated on the Authentication Module.
 IDIFUser logIn(String clientSpecificID, String userID, String password)
          Performs the log in of a user with a given id on the framework.
 void logOut(String clientIdentifier)
          Performs the log out of a user with a given id on the framework.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthenticationManagerStaticImpl

public AuthenticationManagerStaticImpl()
Method Detail

disconnectClient

public void disconnectClient(String clientIdentifier)
Description copied from interface: IAuthenticationManager
Called to notify the authentication system that the client has disconnected. Each implementation will decide what to do in this case. Either do nothing and keep the user connected (if the authentication repository is shared by external systems), of logout the user from the authentication system (if it is a DIF specific authentication system).

Specified by:
disconnectClient in interface IAuthenticationManager
Parameters:
clientIdentifier - the Id that identifies the specific client. Depends on the Channel used to communicate
See Also:
IAuthenticationManager.disconnectClient(java.lang.String)

getLoggedUser

public IDIFUser getLoggedUser(String clientIdentifier)
                       throws AuthenticationManagerException
Description copied from interface: IAuthenticationManager
Searches for the user authenticated for this client in the authentication system and returns it if present.

Specified by:
getLoggedUser in interface IAuthenticationManager
Parameters:
clientIdentifier - the Id that identifies the specific client. Depends on the Channel used to communicate
Returns:
the authenticated user record
Throws:
AuthenticationManagerException - if the resources needed for authentication can't be accessed
See Also:
IAuthenticationManager.getLoggedUser(java.lang.String)

isClientLogged

public boolean isClientLogged(String clientIdentifier)
Description copied from interface: IAuthenticationManager
Checks if a given user is already authenticated on the Authentication Module. TODO: When integrating External Authentication/Authorization/Identity servers like LDAP, Kerberos and others this may change a bit. See these APIs for good candidates for implementing these needs: http://www.ja-sig.org/products/cas/index.html http://www.acegisecurity.org/

Specified by:
isClientLogged in interface IAuthenticationManager
Parameters:
clientIdentifier - the Id that identifies the specific client. Depends on the Channel used to communicate
Returns:
T if a session with this ID is present and active.
See Also:
IAuthenticationManager.isClientLogged(java.lang.String)

logIn

public IDIFUser logIn(String clientSpecificID,
                      String userID,
                      String password)
               throws AuthenticationManagerException
Description copied from interface: IAuthenticationManager
Performs the log in of a user with a given id on the framework.

Specified by:
logIn in interface IAuthenticationManager
Parameters:
clientSpecificID - the Id that identifies the specific client. Depends on the Channel used to communicate
userID - the id of the user to log in
password - the password for the user
Returns:
the updated session object
Throws:
AuthenticationManagerException - if the resources needed for authentication can't be accessed
See Also:
IAuthenticationManager.logIn(java.lang.String, java.lang.String, java.lang.String)

logOut

public void logOut(String clientIdentifier)
Description copied from interface: IAuthenticationManager
Performs the log out of a user with a given id on the framework.

Specified by:
logOut in interface IAuthenticationManager
Parameters:
clientIdentifier - the Id that identifies the specific client. Depends on the Channel used to communicate
See Also:
IAuthenticationManager.logOut(java.lang.String)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.