1 /* Copyright 2009 Justin Erenkrantz and Greg Stein
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
19 #include "auth_kerb.h"
25 void serf__encode_auth_header(const char **header, const char *protocol,
26 const char *data, apr_size_t data_len,
29 /** Basic authentication **/
30 apr_status_t serf__init_basic(int code,
33 apr_status_t serf__init_basic_connection(int code,
34 serf_connection_t *conn,
36 apr_status_t serf__handle_basic_auth(int code,
37 serf_request_t *request,
38 serf_bucket_t *response,
40 const char *auth_attr,
43 apr_status_t serf__setup_request_basic_auth(peer_t peer,
45 serf_connection_t *conn,
46 serf_request_t *request,
49 serf_bucket_t *hdrs_bkt);
51 /** Digest authentication **/
52 apr_status_t serf__init_digest(int code,
55 apr_status_t serf__init_digest_connection(int code,
56 serf_connection_t *conn,
58 apr_status_t serf__handle_digest_auth(int code,
59 serf_request_t *request,
60 serf_bucket_t *response,
62 const char *auth_attr,
65 apr_status_t serf__setup_request_digest_auth(peer_t peer,
67 serf_connection_t *conn,
68 serf_request_t *request,
71 serf_bucket_t *hdrs_bkt);
72 apr_status_t serf__validate_response_digest_auth(peer_t peer,
74 serf_connection_t *conn,
75 serf_request_t *request,
76 serf_bucket_t *response,
80 /** Kerberos authentication **/
81 apr_status_t serf__init_kerb(int code,
84 apr_status_t serf__init_kerb_connection(int code,
85 serf_connection_t *conn,
87 apr_status_t serf__handle_kerb_auth(int code,
88 serf_request_t *request,
89 serf_bucket_t *response,
91 const char *auth_attr,
94 apr_status_t serf__setup_request_kerb_auth(peer_t peer,
96 serf_connection_t *conn,
97 serf_request_t *request,
100 serf_bucket_t *hdrs_bkt);
101 apr_status_t serf__validate_response_kerb_auth(peer_t peer,
103 serf_connection_t *conn,
104 serf_request_t *request,
105 serf_bucket_t *response,
107 #endif /* SERF_HAVE_SPNEGO */