iptsec  1.12.11devel
auth_client.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Sofia-SIP package
3  *
4  * Copyright (C) 2005 Nokia Corporation.
5  *
6  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24 
25 #ifndef AUTH_CLIENT_H
27 #define AUTH_CLIENT_H
28 
38 #ifndef MSG_TYPES_H
39 #include <sofia-sip/msg_types.h>
40 #endif
41 
42 #ifndef URL_H
43 #include <sofia-sip/url.h>
44 #endif
45 
46 SOFIA_BEGIN_DECLS
47 
49 typedef struct auth_client_s auth_client_t;
50 
52 int auc_challenge(auth_client_t **auc, su_home_t *home,
53  msg_auth_t const *auth,
54  msg_hclass_t *crcl);
55 
57 int auc_credentials(auth_client_t **auc, su_home_t *home, char const *data);
58 
60 int auc_info(auth_client_t **auc_list,
61  msg_auth_info_t const *ai,
62  msg_hclass_t *credential_class);
63 
65 int auc_all_credentials(auth_client_t **auc_list,
66  char const *scheme,
67  char const *realm,
68  char const *user,
69  char const *pass);
70 
73  char const *scheme,
74  char const *realm);
75 
77 int auc_copy_credentials(auth_client_t **dst, auth_client_t const *src);
78 
80 int auc_has_authorization(auth_client_t **auc_list);
81 
83 int auc_authorization(auth_client_t **auc_list, msg_t *msg, msg_pub_t *pub,
84  char const *method,
85  url_t const *url,
86  msg_payload_t const *body);
87 
90  su_home_t *home,
91  char const *method,
92  url_t const *url,
93  msg_payload_t const *body,
94  msg_header_t **return_headers);
95 
96 struct sip_s;
97 
99 int auc_authorize(auth_client_t **auc, msg_t *msg, struct sip_s *sip);
100 
101 typedef struct auth_client_plugin auth_client_plugin_t;
102 
104 int auc_register_plugin(auth_client_plugin_t const *plugin);
105 
106 SOFIA_END_DECLS
107 
108 #endif
int auc_authorization_headers(auth_client_t **auc_list, su_home_t *home, char const *method, url_t const *url, msg_payload_t const *body, msg_header_t **return_headers)
Generate headers authorizing a request.
Definition: auth_client.c:764
int auc_all_credentials(auth_client_t **auc_list, char const *scheme, char const *realm, char const *user, char const *pass)
Feed authentication data to the authenticators.
Definition: auth_client.c:381
int auc_credentials(auth_client_t **auc, su_home_t *home, char const *data)
Feed authentication data to the authenticator.
Definition: auth_client.c:311
int auc_authorization(auth_client_t **auc_list, msg_t *msg, msg_pub_t *pub, char const *method, url_t const *url, msg_payload_t const *body)
Authorize a request.
Definition: auth_client.c:699
int auc_register_plugin(auth_client_plugin_t const *plugin)
Register an authentication client plugin.
Definition: auth_client.c:1171
int auc_copy_credentials(auth_client_t **dst, auth_client_t const *src)
Copy authentication data from src to dst.
Definition: auth_client.c:496
struct auth_client_s auth_client_t
Authenticator object.
Definition: auth_client.h:49
int auc_has_authorization(auth_client_t **auc_list)
Check if there are credentials for all challenges.
Definition: auth_client.c:643
int auc_clear_credentials(auth_client_t **auc_list, char const *scheme, char const *realm)
Clear authentication data from the authenticator.
Definition: auth_client.c:593
int auc_challenge(auth_client_t **auc, su_home_t *home, msg_auth_t const *auth, msg_hclass_t *crcl)
Initialize authenticators.
Definition: auth_client.c:102
int auc_info(auth_client_t **auc_list, msg_auth_info_t const *ai, msg_hclass_t *credential_class)
Store authentication info to authenticators.
Definition: auth_client.c:231
struct msg_hclass_s const msg_hclass_t
MSG_HDR_T msg_header_t
MSG_PUB_T msg_pub_t
SU_HOME_T su_home_t
#define SOFIAPUBFUN

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.