Framework Serveur J2EE ACube V2.7.4
CLASSE PRECEDANTE CLASSE SUIVANTE
SOMMAIRE: ATTR CONSTR METH DETAIL: ATTR CONSTR METH

acube.framework.clavierVirtuel.realm
Classe ElectisRealm
java.lang.Object
  org.apache.catalina.realm.RealmBase
      acube.framework.clavierVirtuel.realm.RealmBaseAcube
          acube.framework.clavierVirtuel.realm.ElectisRealm

public class ElectisRealm
hérite de RealmBaseAcube
Classe d'authentification J2EE Realm.

Permet d'authentifier un utilisateur pour l'application Electis avec politique de blocage.
La politique de blocage consiste à refuser l'accès à tout utilisateur dont le compte est bloqué. Un compte est bloqué si un ou plusieurs utilisateurs dépasse un nombre limite de tentatives de connexion à ce compte. Le compte reste bloqué pour un certain temps durant lequel aucun test d'authentification n'est réalisé.
Le déblocage s'effectue si le temps d'attente est dépassé et qu'un utilisateur est authentifié. Son compteur de tentatives de connexions est alors remis à zéro.

Prérequis : Utilise une datasource définie en tant que resource serveur et accessible avec un nom JNDI. Projet ELECTIS.
Author:
eds4

Sommaire des Attributs
private String
dataSourceName
Le nom JNDI de la datasource utilisée.
protected static final String
INFO
Descriptive information about this Realm implementation.
private boolean
localDataSource
Context local datasource.
private static final String
NAME
Descriptive information about this Realm implementation.
Sommaire des Constructeurs
Sommaire des Méthodes
Principal
authenticate(String username, String credentials)
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
protected Principal
authenticate(Connection dbConnection, String username, String credentials)
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
private void
close(Connection dbConnection)
Close the specified database connection.
String
String
getInfo()
{@inheritDoc}
protected String
getName()
{@inheritDoc}
protected String
getPassword(String username)
{@inheritDoc}
protected Principal
getPrincipal(String username)
{@inheritDoc}
boolean
private Connection
open()
Open the specified database connection.
void
setDataSourceName(String argDataSourceName)
void
setLocalDataSource(boolean argLocalDataSource)
void
start()
Prepare for active use of the public methods of this Component.
void
stop()
Gracefully shut down active use of the public methods of this Component.
Méthodes héritées de la classe acube.framework.clavierVirtuel.realm.RealmBaseAcube
authenticate
Méthodes héritées de la classe java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Détail des Attributs
INFO
protected static final String INFO
Descriptive information about this Realm implementation.

NAME
private static final String NAME
Descriptive information about this Realm implementation.

dataSourceName
private String dataSourceName
Le nom JNDI de la datasource utilisée.

localDataSource
private boolean localDataSource
Context local datasource.
Détail des Constructeurs
ElectisRealm
public ElectisRealm()
Détail des méthodes
getDataSourceName
public String getDataSourceName()
Retours:
Returns the dataSourceName.

setDataSourceName
public void setDataSourceName(String argDataSourceName)
Paramètres:
argDataSourceName - The dataSourceName to set.

isLocalDataSource
public boolean isLocalDataSource()
Retours:
Returns the localDataSource.

setLocalDataSource
public void setLocalDataSource(boolean argLocalDataSource)
Paramètres:
argLocalDataSource - The localDataSource to set.

authenticate
public Principal authenticate(String username,
                              String credentials)
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null. If there are any errors with the JDBC connection, executing the query or anything we return null (don't authenticate). This event is also logged, and the connection will be closed so that a subsequent request will automatically re-open it.
Dépacées:
Paramètres:
username - Username of the Principal to look up
credentials - Password or other credentials to use in authenticating this username
Retours:
Principal

authenticate
protected Principal authenticate(Connection dbConnection,
                                 String username,
                                 String credentials)
                          throws Exception
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
Paramètres:
dbConnection - The database connection to be used
username - Username of the Principal to look up
credentials - Password or other credentials to use in authenticating this username
Retours:
Principal
Exceptions:
Exception - if a database error occurs

close
private void close(Connection dbConnection)
Close the specified database connection.
Paramètres:
dbConnection - The connection to be closed

open
private Connection open()
Open the specified database connection.
Retours:
Connection to the database

getName
protected String getName()
{@inheritDoc}

getInfo
public String getInfo()
{@inheritDoc}

getPassword
protected String getPassword(String username)
{@inheritDoc}

getPrincipal
protected Principal getPrincipal(String username)
{@inheritDoc}

start
public void start()
           throws LifecycleException
Prepare for active use of the public methods of this Component.
Exceptions:
LifecycleException - if this component detects a fatal error that prevents it from being started

stop
public void stop()
          throws LifecycleException
Gracefully shut down active use of the public methods of this Component.
Exceptions:
LifecycleException - if this component detects a fatal error that needs to be reported

Framework Serveur J2EE ACube V2.7.4
CLASSE PRECEDANTE CLASSE SUIVANTE
SOMMAIRE: ATTR CONSTR METH DETAIL: ATTR CONSTR METH

Version 2.7.4 du 10/07/2009 / Etat : Validé
Cette création est mise à disposition selon le Contrat Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique disponible en ligne http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ ou par courrier postal à Creative Commons, 559 Nathan Abbott Way, Stanford,California 94305, USA.
Documentation generated by DocFlex