SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osip_www_authenticate.h
Go to the documentation of this file.
1 /*
2  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3  Copyright (C) 2001-2015 Aymeric MOIZARD amoizard@antisip.com
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 
20 
21 #ifndef _OSIP_WWW_AUTHENTICATE_H_
22 #define _OSIP_WWW_AUTHENTICATE_H_
23 
24 
41 
47  {
48  char *auth_type;
49  char *realm;
50  char *domain;
51  char *nonce;
52  char *opaque;
53  char *stale;
54  char *algorithm;
55  char *qop_options;
56  char *version;
57  char *targetname;
58  char *gssapi_data;
59  char *auth_param;
60  };
61 
62 
63 #ifdef __cplusplus
64 extern "C"
65 {
66 #endif
67 
78  int osip_www_authenticate_parse (osip_www_authenticate_t * header, const char *hvalue);
84  int osip_www_authenticate_to_str (const osip_www_authenticate_t * header, char **dest);
96  osip_www_authenticate_t ** dest);
97 
109  char *value);
120  void osip_www_authenticate_set_realm (osip_www_authenticate_t * header, char *value);
131  void osip_www_authenticate_set_domain (osip_www_authenticate_t * header, char *value);
142  void osip_www_authenticate_set_nonce (osip_www_authenticate_t * header, char *value);
153  void osip_www_authenticate_set_opaque (osip_www_authenticate_t * header, char *value);
164  void osip_www_authenticate_set_stale (osip_www_authenticate_t * header, char *value);
169 #define osip_www_authenticate_set_stale_true(header) osip_www_authenticate_set_stale(header,osip_strdup("true"))
170 
174 #define osip_www_authenticate_set_stale_false(header) osip_www_authenticate_set_stale(header,osip_strdup("false"))
175 
186  char *value);
191 #define osip_www_authenticate_set_algorithm_MD5(header) osip_www_authenticate_set_algorithm(header,osip_strdup("MD5"))
192 
203  char *value);
215  char *value);
227  char *value);
239  char *value);
240 
241 #ifdef __cplusplus
242 }
243 #endif
244 
247 #endif
void osip_www_authenticate_set_algorithm(osip_www_authenticate_t *header, char *value)
Add the algorithm parameter in a Www-Authenticate element.
char * osip_www_authenticate_get_qop_options(osip_www_authenticate_t *header)
Get value of the qop_options parameter from a Www-Authenticate element.
void osip_www_authenticate_set_stale(osip_www_authenticate_t *header, char *value)
Add the stale parameter in a Www-Authenticate element.
char * gssapi_data
gssapi-data (optional - NTLM)
void osip_www_authenticate_set_domain(osip_www_authenticate_t *header, char *value)
Add the domain parameter from a Www-Authenticate element.
char * osip_www_authenticate_get_algorithm(osip_www_authenticate_t *header)
Get value of the algorithm parameter from a Www-Authenticate element.
void osip_www_authenticate_set_opaque(osip_www_authenticate_t *header, char *value)
Add the opaque parameter from a Www-Authenticate element.
char * algorithm
algorythm (optional)
char * qop_options
qop option (optional)
void osip_www_authenticate_set_nonce(osip_www_authenticate_t *header, char *value)
Add the nonce parameter from a Www-Authenticate element.
void osip_www_authenticate_set_targetname(osip_www_authenticate_t *header, char *value)
Add the targetname parameter from a Www-Authenticate element.
int osip_www_authenticate_to_str(const osip_www_authenticate_t *header, char **dest)
Get a string representation of a Www-Authenticate element.
int osip_www_authenticate_init(osip_www_authenticate_t **header)
Allocate a Www-Authenticate element.
void osip_www_authenticate_set_gssapi_data(osip_www_authenticate_t *header, char *value)
Add the gssapi_data parameter from a Www-Authenticate element.
char * osip_www_authenticate_get_gssapi_data(osip_www_authenticate_t *header)
Get value of the gssapi_data parameter from a Www-Authenticate element.
char * osip_www_authenticate_get_targetname(osip_www_authenticate_t *header)
Get value of the targetname parameter from a Www-Authenticate element.
int osip_www_authenticate_clone(const osip_www_authenticate_t *header, osip_www_authenticate_t **dest)
Clone a Www-Authenticate element.
char * version
version (optional - NTLM)
int osip_www_authenticate_parse(osip_www_authenticate_t *header, const char *hvalue)
Parse a Www-Authenticate element.
char * osip_www_authenticate_get_auth_type(osip_www_authenticate_t *header)
Get value of the auth_type parameter from a Www-Authenticate element.
char * targetname
targetname (optional - NTLM)
char * realm
realm (as a quoted-string)
char * nonce
nonce (optional)
void osip_www_authenticate_set_version(osip_www_authenticate_t *header, char *value)
Add the version parameter from a Www-Authenticate element.
char * stale
stale (optional)
char * osip_www_authenticate_get_nonce(osip_www_authenticate_t *header)
Get value of the nonce parameter from a Www-Authenticate element.
char * osip_www_authenticate_get_version(osip_www_authenticate_t *header)
Get value of the version parameter from a Www-Authenticate element.
void osip_www_authenticate_free(osip_www_authenticate_t *header)
Free a Www-Authenticate element.
char * osip_www_authenticate_get_opaque(osip_www_authenticate_t *header)
Get value of the opaque parameter from a Www-Authenticate element.
char * auth_param
other parameters (optional)
char * value[96]
Definition: cgiserver.cpp:90
void osip_www_authenticate_set_auth_type(osip_www_authenticate_t *header, char *value)
Add the auth_type parameter from a Www-Authenticate element.
char * osip_www_authenticate_get_realm(osip_www_authenticate_t *header)
Get value of the realm parameter from a Www-Authenticate element.
char * domain
domain (optional)
char * osip_www_authenticate_get_domain(osip_www_authenticate_t *header)
Get value of the domain parameter from a Www-Authenticate element.
void osip_www_authenticate_set_qop_options(osip_www_authenticate_t *header, char *value)
Add the qop_options parameter from a Www-Authenticate element.
char * osip_www_authenticate_get_stale(osip_www_authenticate_t *header)
Get value of the stale parameter from a Www-Authenticate element.
char * auth_type
Authentication Type (Basic or Digest.
Definition of the WWW-Authenticate header.
char * opaque
opaque (optional)
void osip_www_authenticate_set_realm(osip_www_authenticate_t *header, char *value)
Add the realm parameter from a Www-Authenticate element.