\section{eXosip2 authentication API} \label{group__eXosip2__authentication}\index{eXosip2 authentication API@{eXosip2 authentication API}} \subsection*{Functions} \begin{CompactItemize} \item int {\bf eXosip\_\-add\_\-authentication\_\-info} (const char $\ast$username, const char $\ast$userid, const char $\ast$passwd, const char $\ast$ha1, const char $\ast$realm) \item int {\bf eXosip\_\-clear\_\-authentication\_\-info} (void) \item int {\bf eXosip\_\-default\_\-action} ({\bf eXosip\_\-event\_\-t} $\ast$je) \item void {\bf eXosip\_\-automatic\_\-refresh} (void) \item void {\bf eXosip\_\-automatic\_\-action} (void) \item int {\bf eXosip\_\-insubscription\_\-automatic} ({\bf eXosip\_\-event\_\-t} $\ast$evt) \item int {\bf eXosip\_\-generate\_\-random} (char $\ast$buf, int buf\_\-size) \end{CompactItemize} \subsection{Function Documentation} \index{eXosip2\_\-authentication@{eXosip2\_\-authentication}!eXosip\_\-add\_\-authentication\_\-info@{eXosip\_\-add\_\-authentication\_\-info}} \index{eXosip\_\-add\_\-authentication\_\-info@{eXosip\_\-add\_\-authentication\_\-info}!eXosip2_authentication@{eXosip2\_\-authentication}} \subsubsection[{eXosip\_\-add\_\-authentication\_\-info}]{\setlength{\rightskip}{0pt plus 5cm}int eXosip\_\-add\_\-authentication\_\-info (const char $\ast$ {\em username}, \/ const char $\ast$ {\em userid}, \/ const char $\ast$ {\em passwd}, \/ const char $\ast$ {\em ha1}, \/ const char $\ast$ {\em realm})}\label{group__eXosip2__authentication_g7a2bcd36a22919743da23f61cc6663a0} Add authentication credentials. These are used when an outgoing request comes back with an authorization required response. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em username}]username \item[{\em userid}]login (usually equals the username) \item[{\em passwd}]password \item[{\em ha1}]currently ignored \item[{\em realm}]realm within which credentials apply, or NULL to apply credentials to unrecognized realms \end{description} \end{Desc} \index{eXosip2\_\-authentication@{eXosip2\_\-authentication}!eXosip\_\-clear\_\-authentication\_\-info@{eXosip\_\-clear\_\-authentication\_\-info}} \index{eXosip\_\-clear\_\-authentication\_\-info@{eXosip\_\-clear\_\-authentication\_\-info}!eXosip2_authentication@{eXosip2\_\-authentication}} \subsubsection[{eXosip\_\-clear\_\-authentication\_\-info}]{\setlength{\rightskip}{0pt plus 5cm}int eXosip\_\-clear\_\-authentication\_\-info (void)}\label{group__eXosip2__authentication_g36f0d2b77e4485b8b7bed96c082592b5} Clear all authentication credentials stored in eXosip. \index{eXosip2\_\-authentication@{eXosip2\_\-authentication}!eXosip\_\-default\_\-action@{eXosip\_\-default\_\-action}} \index{eXosip\_\-default\_\-action@{eXosip\_\-default\_\-action}!eXosip2_authentication@{eXosip2\_\-authentication}} \subsubsection[{eXosip\_\-default\_\-action}]{\setlength{\rightskip}{0pt plus 5cm}int eXosip\_\-default\_\-action ({\bf eXosip\_\-event\_\-t} $\ast$ {\em je})}\label{group__eXosip2__authentication_g55b275932340fc2a1abd5242aca54767} Initiate some default actions: Retry with credentials upon reception of 401/407. Retry with Contact header upon reception of 3xx request. \index{eXosip2\_\-authentication@{eXosip2\_\-authentication}!eXosip\_\-automatic\_\-refresh@{eXosip\_\-automatic\_\-refresh}} \index{eXosip\_\-automatic\_\-refresh@{eXosip\_\-automatic\_\-refresh}!eXosip2_authentication@{eXosip2\_\-authentication}} \subsubsection[{eXosip\_\-automatic\_\-refresh}]{\setlength{\rightskip}{0pt plus 5cm}void eXosip\_\-automatic\_\-refresh (void)}\label{group__eXosip2__authentication_g1360c11a65da010a46514f43e21eb718} Refresh REGISTER and SUBSCRIBE before the expiration delay. \index{eXosip2\_\-authentication@{eXosip2\_\-authentication}!eXosip\_\-automatic\_\-action@{eXosip\_\-automatic\_\-action}} \index{eXosip\_\-automatic\_\-action@{eXosip\_\-automatic\_\-action}!eXosip2_authentication@{eXosip2\_\-authentication}} \subsubsection[{eXosip\_\-automatic\_\-action}]{\setlength{\rightskip}{0pt plus 5cm}void eXosip\_\-automatic\_\-action (void)}\label{group__eXosip2__authentication_gc4fb70cd9af20fbc16c72c660cb7c372} Initiate some automatic actions: Retry with credentials upon reception of 401/407. Refresh REGISTER and SUBSCRIBE before the expiration delay. Retry with Contact header upon reception of 3xx request. \index{eXosip2\_\-authentication@{eXosip2\_\-authentication}!eXosip\_\-insubscription\_\-automatic@{eXosip\_\-insubscription\_\-automatic}} \index{eXosip\_\-insubscription\_\-automatic@{eXosip\_\-insubscription\_\-automatic}!eXosip2_authentication@{eXosip2\_\-authentication}} \subsubsection[{eXosip\_\-insubscription\_\-automatic}]{\setlength{\rightskip}{0pt plus 5cm}int eXosip\_\-insubscription\_\-automatic ({\bf eXosip\_\-event\_\-t} $\ast$ {\em evt})}\label{group__eXosip2__authentication_g4495417ae52e7bbc40e0f34c55d53ce5} Automatic internal handling of known package. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em evt}]event related to an incoming subscription. \end{description} \end{Desc} \index{eXosip2\_\-authentication@{eXosip2\_\-authentication}!eXosip\_\-generate\_\-random@{eXosip\_\-generate\_\-random}} \index{eXosip\_\-generate\_\-random@{eXosip\_\-generate\_\-random}!eXosip2_authentication@{eXosip2\_\-authentication}} \subsubsection[{eXosip\_\-generate\_\-random}]{\setlength{\rightskip}{0pt plus 5cm}int eXosip\_\-generate\_\-random (char $\ast$ {\em buf}, \/ int {\em buf\_\-size})}\label{group__eXosip2__authentication_gb3cf3bd8e342e63e644a772b358b15e6} Generate random string: \begin{Desc} \item[Parameters:] \begin{description} \item[{\em buf}]destination buffer for random string. \item[{\em buf\_\-size}]size of destination buffer \end{description} \end{Desc}