Commit 0c4c7e47 authored by Pekka Pessi's avatar Pekka Pessi

iptsec: added plugin interface to client side, too.

Added sofia-sip/auth_client_plugin.h, modified sofia-sip/auth_client.h,
auth_client.c.

darcs-hash:20060524213027-65a35-626fe998dadcb8c344fc7664766d91f85fbfdd81.gz
parent 02ca0564
This diff is collapsed.
......@@ -26,8 +26,8 @@
/** Defined when <sofia-sip/auth_client.h> has been included. */
#define AUTH_CLIENT_H
/**@file sofia-sip/auth_client.h
*
* @brief Client-side authenticator library.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
......@@ -38,12 +38,7 @@
#ifndef MSG_TYPES_H
#include <sofia-sip/msg_types.h>
#endif
#ifndef AUTH_DIGEST_H
#include <sofia-sip/auth_digest.h>
#endif
#ifndef AUTH_NTLM_H
#include <sofia-sip/auth_ntlm.h>
#endif
#ifndef URL_H
#include <sofia-sip/url.h>
#endif
......@@ -95,6 +90,11 @@ struct sip_s;
SOFIAPUBFUN
int auc_authorize(auth_client_t **auc, msg_t *msg, struct sip_s *sip);
typedef struct auth_client_plugin auth_client_plugin_t;
SOFIAPUBFUN
int auc_register_plugin(auth_client_plugin_t const *plugin);
SOFIA_END_DECLS
#endif
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef AUTH_CLIENT_PLUGIN_H
/** Defined when <sofia-sip/auth_client_plugin.h> has been included. */
#define AUTH_CLIENT_PLUGIN_H
/**@file sofia-sip/auth_client_plugin.h
* @brief Client-side plugin interface for authentication
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Fri May 19 16:18:21 EEST 2006
*/
#ifndef AUTH_CLIENT_H
#include "sofia-sip/auth_client.h"
#endif
#ifndef MSG_HEADER_H
#include <sofia-sip/msg_header.h>
#endif
SOFIA_BEGIN_DECLS
/* ====================================================================== */
struct auth_client_s {
su_home_t ca_home[1];
auth_client_plugin_t const *ca_auc;
auth_client_t *ca_next;
char const *ca_scheme;
char const *ca_realm;
char *ca_user;
char *ca_pass;
msg_hclass_t *ca_credential_class;
};
struct auth_client_plugin
{
int auc_plugin_size, auc_size;
char const *auc_name;
/** Store challenge */
int (*auc_challenge)(auth_client_t *ca,
msg_auth_t const *ch);
/** Authorize request. */
int (*auc_authorize)(auth_client_t *ca,
su_home_t *h,
char const *method,
url_t const *url,
msg_payload_t const *body,
msg_header_t **return_headers);
};
SOFIA_END_DECLS
#endif /* !defined AUTH_CLIENT_PLUGIN_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment