osip_www_authenticate_t结构体存储www_authenticate头域的信息参数
是服务器发送给客户端401数据包携带的认证信息,目的希望客户端通过发送的认证信息
通过计算,发送一个校验返回。
主要包括nonce和realm字段。
osip_authorization_t结构体存储的是Authorization头域的信息参数
是客户端发送给服务器的认证反馈,目的是希望服务器根据认证字段校验客户端的
合法性
主要包括以下的字段:
nonce realm uri username method algorithm
以下是两个结构体的定义:
typedef struct osip_authorization osip_authorization_t;
/**
* Definition of the Authorization header.
* @struct osip_authorization
*/
struct osip_authorization
{
char *auth_type;/**< Authentication Type (Basic or Digest) */
char *username;/**< login */
char *realm;/**< realm (as a quoted-string) */
char *nonce;/**< nonce */
char *uri; /**< uri */
char *response;/**< response */
char *digest;/**< digest *