JdbcAuthenticationManager
Description
This AuthenticationManager implementation permits to persist in a database all the authentication informations of your application. you can either establish connections through Driver parameters, or by a DataSource grabbed with a JNDI reference.- Driver parameters
- Datasource grabbed via JNDI
parameters
| name | mandatory | values | description | example |
|---|---|---|---|---|
| database Driver | no | com.mysql.jdbc.Driver | ||
| databaseDriverUrl | no | a Jdbc compliant url | jdbc:mysql://10.0.0.10/jguardexample | |
| databaseDriverLogin | no | any valid database user login | ||
| databaseDriverPassword | no | any valid XML path relative to database | ||
| authenticationXmlFileLocation | no | any valid XML file path relative to webapp.this file will be used to import data into database if the database is empty | ||
| authenticationDatabaseFileLocation | no | any valid properties file path relative to webapp specific to the database used.:this properties file contains SQL queries realted to your database. this properties file contains SQL queries realted to your database. the Oracle properties one, is valid for oracle 9i and higher | ||
| JNDI | no | any valid JNDI reference |
configuration with Driver parameters
.... .... <authenticationManager>net.sf.jguard.authentication.JdbcAuthenticationManager</authenticationManager> <authenticationManagerOptions> <option> <name>databaseDriver</name> <value>com.mysql.jdbc.Driver</value> </option> <option> <name>databaseDriverUrl</name> <value>jdbc:mysql://10.0.0.10/jguardexample</value> </option> <option> <name>databaseDriverLogin</name> <value>jguard</value> </option> <option> <name>databaseDriverPassword</name> <value>jguard</value> </option> <option> <name>authenticationXmlFileLocation</name> <value>WEB-INF/conf/jGuard/jGuardUsersPrincipals.xml</value> </option> <option> <name>authenticationDatabaseFileLocation</name> <value>WEB-INF/conf/jGuard/authentication.mysql.properties</value> </option> </authenticationManagerOptions> .... ....
configuration with JNDI Datasource
.... .... <authenticationManager>net.sf.jguard.authentication.JdbcAuthenticationManager</authenticationManager> <authenticationManagerOptions> <option> <name>JNDI</name> <value>java:/comp/env/jguard</value> </option> </authenticationManagerOptions> .... ....
Version 1.11 last modified by Charles Gay on 22/10/2006 at 17:04
Document data
Attachments:
No attachments for this document
Comments: 0