iptsec 1.12.10
|
00001 /* 00002 * This file is part of the Sofia-SIP package 00003 * 00004 * Copyright (C) 2005 Nokia Corporation. 00005 * 00006 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 * 00023 */ 00024 00025 #ifndef AUTH_CLIENT_H 00026 00027 #define AUTH_CLIENT_H 00028 00038 #ifndef MSG_TYPES_H 00039 #include <sofia-sip/msg_types.h> 00040 #endif 00041 00042 #ifndef URL_H 00043 #include <sofia-sip/url.h> 00044 #endif 00045 00046 SOFIA_BEGIN_DECLS 00047 00049 typedef struct auth_client_s auth_client_t; 00050 00051 SOFIAPUBFUN 00052 int auc_challenge(auth_client_t **auc, su_home_t *home, 00053 msg_auth_t const *auth, 00054 msg_hclass_t *crcl); 00055 00056 SOFIAPUBFUN 00057 int auc_credentials(auth_client_t **auc, su_home_t *home, char const *data); 00058 00059 SOFIAPUBFUN 00060 int auc_info(auth_client_t **auc_list, 00061 msg_auth_info_t const *ai, 00062 msg_hclass_t *credential_class); 00063 00064 SOFIAPUBFUN 00065 int auc_all_credentials(auth_client_t **auc_list, 00066 char const *scheme, 00067 char const *realm, 00068 char const *user, 00069 char const *pass); 00070 00071 SOFIAPUBFUN 00072 int auc_clear_credentials(auth_client_t **auc_list, 00073 char const *scheme, 00074 char const *realm); 00075 00076 SOFIAPUBFUN 00077 int auc_copy_credentials(auth_client_t **dst, auth_client_t const *src); 00078 00079 SOFIAPUBFUN 00080 int auc_has_authorization(auth_client_t **auc_list); 00081 00082 SOFIAPUBFUN 00083 int auc_authorization(auth_client_t **auc_list, msg_t *msg, msg_pub_t *pub, 00084 char const *method, 00085 url_t const *url, 00086 msg_payload_t const *body); 00087 00088 SOFIAPUBFUN 00089 int auc_authorization_headers(auth_client_t **auc_list, 00090 su_home_t *home, 00091 char const *method, 00092 url_t const *url, 00093 msg_payload_t const *body, 00094 msg_header_t **return_headers); 00095 00096 struct sip_s; 00097 00098 SOFIAPUBFUN 00099 int auc_authorize(auth_client_t **auc, msg_t *msg, struct sip_s *sip); 00100 00101 typedef struct auth_client_plugin auth_client_plugin_t; 00102 00103 SOFIAPUBFUN 00104 int auc_register_plugin(auth_client_plugin_t const *plugin); 00105 00106 SOFIA_END_DECLS 00107 00108 #endif