HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
194 HP-UX C SIP Stack Programmer’s Guide
Client Authentication Implementation
You can construct an Authentication header and set the fields using the Message
API. You should then set the header to the authenticator, using
RvSipAuthenticatorSetProxyAuthInfo(). The authenticator uses the header for
building the Proxy-Authorization header that is inserted into the initial request.
The following API functions supply in-advance authentication control:
RvSipAuthenticatorSetProxyAuthInfo()
Sets a Proxy-Authorization header to the authenticator. This header will be used
to authenticate requests in advance. You can use this function in cases where all
outgoing requests are passed through the same Proxy. For example, when
working with an outbound Proxy. In these cases, the UAC might know all the
information needed for the authentication process in advance and may wish to
send initial requests with authorization information. The Proxy can then
authenticate the UAC immediately without sending a 407 response.
The authenticator uses the header for building the Proxy-Authorization header
that is inserted into the initial request.
RvSipAuthenticatorSetNonceCount()
Sets the initial value of the nonce-count parameter that will be used when
creating the Proxy-Authorization header that is placed in outgoing requests. This
nonce count is used with the challenge supplied by calling the
RvSipAuthenticatorSetProxyAuthInfo() function for authenticating messages in
advance. The nonce-count value is incremented by the authenticator after each
header calculation, according to RFC 2617.
RvSipAuthenticatorAddProxyAuthorizationToMsg()
Adds a Proxy-Authorization header to the supplied message. You can use this
function only if you set a Proxy-Authenticate header to the authenticator using
the RvSipAuthenticatorSetProxyAuthInfo() function. The authenticator uses the
challenge found in the Proxy-Authenticate header to build the correct Proxy-
Authorization() header. You should use this function if you want to add
credentials to outgoing requests that were sent by stand-alone transactions. This
function should be called from the RvSipTransactionMsgToSendEv() callback
of the transaction. For other SIP Stack objects, the process of adding the
authorization header is automatic.