forked from mirrors/kore
"request" auth blocks should set their own response.
This commit is contained in:
parent
2049bc72dc
commit
6eec8166c6
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user