Move loading of user data to authenticator modules
The authenticator modules now load the user data when the new loadusers entry point is called. This new entry point is optional. At the moment the code that was in service.c was just moved into the modules but the ground work for allowing different user loading mechanisms is done. Further improvements need to be made so that the authenticators behave more like routers and filters. This work includes the creation of a AUTHENTICATOR module object, addition of createInstance entry points for authenticators and implementing it for all authenticators.
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file http_ba__auth.c
|
||||
* @file http_ba_auth.c
|
||||
*
|
||||
* MaxScale HTTP Basic Access authentication for the HTTPD protocol module.
|
||||
*
|
||||
@ -32,6 +32,7 @@
|
||||
#include <openssl/bio.h>
|
||||
#include <service.h>
|
||||
#include <secrets.h>
|
||||
#include <users.h>
|
||||
|
||||
/* @see function load_module in load_utils.c for explanation of the following
|
||||
* lint directives.
|
||||
@ -46,7 +47,7 @@ MODULE_INFO info =
|
||||
};
|
||||
/*lint +e14 */
|
||||
|
||||
static char *version_str = "V1.0.0";
|
||||
static char *version_str = "V1.1.0";
|
||||
|
||||
static int http_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
|
||||
static bool http_auth_is_client_ssl_capable(DCB *dcb);
|
||||
@ -62,6 +63,7 @@ static GWAUTHENTICATOR MyObject =
|
||||
http_auth_is_client_ssl_capable, /* Check if client supports SSL */
|
||||
http_auth_authenticate, /* Authenticate user credentials */
|
||||
http_auth_free_client_data, /* Free the client data held in DCB */
|
||||
users_default_loadusers
|
||||
};
|
||||
|
||||
typedef struct http_auth
|
||||
|
Reference in New Issue
Block a user