"request" auth blocks should set their own response.

This commit is contained in:
Joris Vink 2015-02-04 12:04:07 +01:00
parent 2049bc72dc
commit 6eec8166c6
2 changed files with 6 additions and 0 deletions

View File

@ -85,6 +85,10 @@ kore_auth(struct http_request *req, struct kore_auth *auth)
break;
}
/* Authentication types of "request" send their own HTTP responses. */
if (auth->type == KORE_AUTH_TYPE_REQUEST)
return (r);
kore_debug("kore_auth() for %s failed", req->path);
if (auth->redirect == NULL) {

View File

@ -796,6 +796,8 @@ configure_authentication_type(char **argv)
current_auth->type = KORE_AUTH_TYPE_COOKIE;
} else if (!strcmp(argv[1], "header")) {
current_auth->type = KORE_AUTH_TYPE_HEADER;
} else if (!strcmp(argv[1], "request")) {
current_auth->type = KORE_AUTH_TYPE_REQUEST;
} else {
printf("unknown authentication type '%s'\n", argv[1]);
return (KORE_RESULT_ERROR);