source: serf/vendor/1.2.1/auth/auth.h@ 703

Last change on this file since 703 was 703, checked in by Yuri Dario, 11 years ago

serf: tag current vendor version.

File size: 5.3 KB
Line 
1/* Copyright 2009 Justin Erenkrantz and Greg Stein
2 *
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
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
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.
14 */
15
16#ifndef AUTH_H
17#define AUTH_H
18
19#include "auth_kerb.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25void serf__encode_auth_header(const char **header, const char *protocol,
26 const char *data, apr_size_t data_len,
27 apr_pool_t *pool);
28
29/** Basic authentication **/
30apr_status_t serf__init_basic(int code,
31 serf_context_t *ctx,
32 apr_pool_t *pool);
33apr_status_t serf__init_basic_connection(int code,
34 serf_connection_t *conn,
35 apr_pool_t *pool);
36apr_status_t serf__handle_basic_auth(int code,
37 serf_request_t *request,
38 serf_bucket_t *response,
39 const char *auth_hdr,
40 const char *auth_attr,
41 void *baton,
42 apr_pool_t *pool);
43apr_status_t serf__setup_request_basic_auth(peer_t peer,
44 int code,
45 serf_connection_t *conn,
46 serf_request_t *request,
47 const char *method,
48 const char *uri,
49 serf_bucket_t *hdrs_bkt);
50
51/** Digest authentication **/
52apr_status_t serf__init_digest(int code,
53 serf_context_t *ctx,
54 apr_pool_t *pool);
55apr_status_t serf__init_digest_connection(int code,
56 serf_connection_t *conn,
57 apr_pool_t *pool);
58apr_status_t serf__handle_digest_auth(int code,
59 serf_request_t *request,
60 serf_bucket_t *response,
61 const char *auth_hdr,
62 const char *auth_attr,
63 void *baton,
64 apr_pool_t *pool);
65apr_status_t serf__setup_request_digest_auth(peer_t peer,
66 int code,
67 serf_connection_t *conn,
68 serf_request_t *request,
69 const char *method,
70 const char *uri,
71 serf_bucket_t *hdrs_bkt);
72apr_status_t serf__validate_response_digest_auth(peer_t peer,
73 int code,
74 serf_connection_t *conn,
75 serf_request_t *request,
76 serf_bucket_t *response,
77 apr_pool_t *pool);
78
79#ifdef SERF_HAVE_KERB
80/** Kerberos authentication **/
81apr_status_t serf__init_kerb(int code,
82 serf_context_t *ctx,
83 apr_pool_t *pool);
84apr_status_t serf__init_kerb_connection(int code,
85 serf_connection_t *conn,
86 apr_pool_t *pool);
87apr_status_t serf__handle_kerb_auth(int code,
88 serf_request_t *request,
89 serf_bucket_t *response,
90 const char *auth_hdr,
91 const char *auth_attr,
92 void *baton,
93 apr_pool_t *pool);
94apr_status_t serf__setup_request_kerb_auth(peer_t peer,
95 int code,
96 serf_connection_t *conn,
97 serf_request_t *request,
98 const char *method,
99 const char *uri,
100 serf_bucket_t *hdrs_bkt);
101apr_status_t serf__validate_response_kerb_auth(peer_t peer,
102 int code,
103 serf_connection_t *conn,
104 serf_request_t *request,
105 serf_bucket_t *response,
106 apr_pool_t *pool);
107#endif /* SERF_HAVE_SPNEGO */
108
109#ifdef __cplusplus
110}
111#endif
112
113#endif /* !AUTH_H */
Note: See TracBrowser for help on using the repository browser.