Package org.kawanfw.sql.api.server.auth
Interface UserAuthenticator
- All Known Implementing Classes:
JdbcUserAuthenticator
,LdapUserAuthenticator
,SshUserAuthenticator
,WebServiceUserAuthenticator
,WindowsUserAuthenticator
public interface UserAuthenticator
Interface that defines how to authenticate a remote client that wants to
create an AceQL session.
Following built-in and ready to use classes are provided. No coding is required. See each Javadoc for more details:
Following built-in and ready to use classes are provided. No coding is required. See each Javadoc for more details:
JdbcUserAuthenticator
: authenticates the remote client (username, password) against a SQL table using a JDBC query.LdapUserAuthenticator
: authenticates the remote client (username, password) against a LDAP server.SshUserAuthenticator
: authenticates the remote client (username, password) against a SSH server.WebServiceUserAuthenticator
: authenticates the remote client (username, password) against a Web service.WindowsUserAuthenticator
: authenticates the remote client (username, password) against the Windows server on which the AceQL server is running.
- Since:
- 5.0
- Author:
- Nicolas de Pomereu
-
Method Summary
-
Method Details
-
login
boolean login(String username, char[] password, String database, String ipAddress) throws IOException, SQLExceptionAllows to authenticate the remote(username, password)
couple sent by the client side.The AceQL HTTP Server will call the method in order to grant or not client access.
Typical usage would be to check the (username, password) couple against a LDAP server or against a SSH server, etc. The method allows to retrieve:
- The name of the database to which the client wants to connect.
- The IP address of the client.
- Parameters:
username
- the username sent by the clientpassword
- the password to connect to the serverdatabase
- the database name to which the client wants to connectipAddress
- the IP address of the client user- Returns:
- true if the client is authenticated by the method. If false, the client side will not be authorized to send any command.
- Throws:
IOException
- if an IOException occursSQLException
- if a SQLException occurs
-