challenge.h

Go to the documentation of this file.
00001 /*
00002  * $Id: challenge.h 5239 2008-11-21 10:24:44Z henningw $
00003  *
00004  * Copyright (C) 2001-2003 FhG Fokus
00005  *
00006  * This file is part of Kamailio, a free SIP server.
00007  *
00008  * Kamailio is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version
00012  *
00013  * Kamailio is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License 
00019  * along with this program; if not, write to the Free Software 
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  */
00022 
00023 /*!
00024  * \file
00025  * \brief Challenge related functions
00026  * \ingroup auth
00027  * - Module: \ref auth
00028  */
00029 
00030 #ifndef CHALLENGE_H
00031 #define CHALLENGE_H
00032 
00033 #include "../../parser/msg_parser.h"
00034 
00035 
00036 /*!
00037  * \brief Challenge a user to send credentials using WWW-Authorize header field
00038  * \param _msg SIP message
00039  * \param _realm authentification realm
00040  * \param _qop qop value
00041  * \return 0 if challenge could be sended, -1 on failure
00042  */
00043 int www_challenge(struct sip_msg* _msg, char* _realm, char* _qop);
00044 
00045 
00046 /*!
00047  * \brief Challenge a user to send credentials using Proxy-Authorize header field
00048  * \param _msg SIP message
00049  * \param _realm authentification realm
00050  * \param _qop qop value
00051  * \return 0 if challenge could be sended, -1 on failure
00052  */
00053 int proxy_challenge(struct sip_msg* _msg, char* _realm, char* _qop);
00054 
00055 
00056 /*!
00057  * \brief Remove used credentials from a SIP message header
00058  * \param _m SIP message
00059  * \param _s1 unused
00060  * \param _s2 unused
00061  * \return 1 when credentials could be removed, -1 if not found or on failure
00062  */
00063 int consume_credentials(struct sip_msg* _m, char* _s1, char* _s2);
00064 
00065 
00066 #endif

Generated on Mon May 21 16:00:24 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6