SELECT password FROM auth_users WHERE username = '${user}'
The MySQL validator allows you to authenticate a user against a MySQL database.
Parameter | Description |
---|---|
host | Optional. The server that is running the MySQL database server. Default: localhost. |
port | Optional. The port that MySQL is listening on. Default: 3306. |
unix_socket | Optional. A Unix socket. |
user | The MySQL user to authenticate as. |
passwd | The MySQL user password to use. |
database | Required. The MySQL database to select upon connection. |
query | Required. The query to execute to authenticate the HTTP user. |
use_md5_passwd | Optional. The passwords in the database table are hashed with MD5. Default: 0. |
against it. Take a look at the following example:
SELECT password FROM auth_users WHERE username = '${user}'
The query must return one row with one column as the password. The name of the column does not matter.
This validator is compatible with both basic and digest schemes.