org.garret.consus
Interface ConsusAuthenticator

All Known Implementing Classes:
StdAuthenticator

public interface ConsusAuthenticator

Authenticator interface


Method Summary
 boolean add(ConsusConnection conxn, java.util.Properties userInfo)
          Add a new user.
 boolean authenticate(ConsusConnection conxn, java.util.Properties userInfo)
          Performs client authentication.
 boolean change(ConsusConnection conxn, java.util.Properties userInfo)
          Change users properties.
 boolean remove(ConsusConnection conxn, java.util.Properties userInfo)
          Remove user.
 

Method Detail

add

boolean add(ConsusConnection conxn,
            java.util.Properties userInfo)
            throws java.sql.SQLException
Add a new user.

Parameters:
conxn - connection with the database
userInfo - user properties
Returns:
true if user is successfully added, false otherwise.
Throws:
java.sql.SQLException

authenticate

boolean authenticate(ConsusConnection conxn,
                     java.util.Properties userInfo)
                     throws java.sql.SQLException
Performs client authentication. Information about the user is passed through the Properties structure. Usually it contains "user" and "password" properties. Consus server adds the "host" property where it stores the remote Inet address of the connected socket. This structure is specified while establishing connection with the server by the Driver.connect(String url, java.util.Properties info) method.

Parameters:
conxn - connection with the database
userInfo - user login properties
Returns:
true if client is authenticated (connection is accepted) or false if connection is refused.
Throws:
java.sql.SQLException

change

boolean change(ConsusConnection conxn,
               java.util.Properties userInfo)
               throws java.sql.SQLException
Change users properties. Updates the properties used for authentication, other than user name or ID.

Parameters:
conxn - connection with the database
userInfo - new user properties (specify user name or ID of an existing user)
Throws:
java.sql.SQLException

remove

boolean remove(ConsusConnection conxn,
               java.util.Properties userInfo)
               throws java.sql.SQLException
Remove user.

Parameters:
conxn - connection with the database
userInfo - user properties
Returns:
true if information about user is removed, false if there is no such user.
Throws:
java.sql.SQLException