Package org.kawanfw.sql.api.server.auth
Class WindowsUserAuthenticator
java.lang.Object
org.kawanfw.sql.api.server.auth.WindowsUserAuthenticator
- All Implemented Interfaces:
UserAuthenticator
public class WindowsUserAuthenticator extends Object implements UserAuthenticator
A concrete
(There a no mandatory properties to define in the
UserAuthenticator
that allows zero-code remote client
(username, password)
authentication against the Windows machine on
which the AceQL instance is running. (There a no mandatory properties to define in the
aceql-server.properties
file.)- Since:
- 5.0
- Author:
- Nicolas de Pomereu
- See Also:
UserAuthenticator
-
Constructor Summary
Constructors Constructor Description WindowsUserAuthenticator()
-
Method Summary
-
Constructor Details
-
WindowsUserAuthenticator
public WindowsUserAuthenticator()
-
-
Method Details
-
login
public boolean login(String username, char[] password, String database, String ipAddress) throws IOException, SQLExceptionDescription copied from interface:UserAuthenticator
Allows 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.
- Specified by:
login
in interfaceUserAuthenticator
- 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
-