pt.digitalis.dif.controller.security.managers
Interface IAuthenticationManager

All Known Implementing Classes:
AuthenticationManagerStaticImpl

public interface IAuthenticationManager

Defines the behavior for an authentication manager.

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

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 clientIdentifier, 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.
 

Method Detail

isClientLogged

boolean isClientLogged(String clientIdentifier)
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/

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.

logIn

IDIFUser logIn(String clientIdentifier,
               String userID,
               String password)
               throws AuthenticationManagerException
Performs the log in of a user with a given id on the framework.

Parameters:
clientIdentifier - 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

logOut

void logOut(String clientIdentifier)
Performs the log out of a user with a given id on the framework.

Parameters:
clientIdentifier - the Id that identifies the specific client. Depends on the Channel used to communicate

disconnectClient

void disconnectClient(String clientIdentifier)
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).

Parameters:
clientIdentifier - the Id that identifies the specific client. Depends on the Channel used to communicate

getLoggedUser

IDIFUser getLoggedUser(String clientIdentifier)
                       throws AuthenticationManagerException
Searches for the user authenticated for this client in the authentication system and returns it if present.

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


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