ec_httpsrv_register_auth — Register an HTTP handler for authenticating a URI
int **ec_httpsrv_register_auth** ( | instance, | |
| | method, | |
| | path, | |
| | closure, | |
| | handler
); | |
const char * <var class="pdparam">instance</var>;
const char * <var class="pdparam">method</var>;
const char * <var class="pdparam">path</var>;
ec_blobject * <var class="pdparam">closure</var>;
ec_httpsrv_auth_handler_func <var class="pdparam">handler</var>;
This function registers an HTTP handler for authenticating a URI.
This is reserved for future use in virtual host support and must currently be NULL.
HTTP method to be handled
Base URI path
The trailing ‘
/’ character is optional.
Closure that is passed through to the handler via ec_httpsrv_service_ctx_get
Function that is invoked on matching requests
Authentication handlers are matched using the same algorithm as request handlers. See the description of ec_httpsrv_register for details.
This function returns
0 on success. On failure, it returns an error number that indicates the nature of the failure.
This hook can be called in any thread.