MXS-862: Add authenticator options and instances
Authenticators now have a similar mechanism to the `router_options` parameter which enables configurable authentication. The authenticators also have a new initialize entry point which is similar to the createInstance entry point of the filters and routers. The value of `authenticator_options` is passed as a parameter to this function. The return vaulue of the `initialize` entry point is passed to the `create` entry point.
This commit is contained in:
@ -598,7 +598,7 @@ createInstance(SERVICE *service, char **options)
|
||||
{
|
||||
SERVER *server;
|
||||
SSL_LISTENER *ssl_cfg;
|
||||
server = server_alloc("_none_", "MySQLBackend", (int)3306);
|
||||
server = server_alloc("_none_", "MySQLBackend", 3306, "MySQLBackendAuth", NULL);
|
||||
if (server == NULL)
|
||||
{
|
||||
MXS_ERROR("%s: Error for server_alloc in createInstance",
|
||||
|
@ -105,7 +105,7 @@ int main(int argc, char **argv) {
|
||||
s = strtok_r(NULL, ",", &lasts);
|
||||
}
|
||||
|
||||
server = server_alloc("_none_", "MySQLBackend", (int)3306);
|
||||
server = server_alloc("_none_", "MySQLBackend", 3306, "MySQLBackendAuth", NULL);
|
||||
if (server == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user