HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
204 HP-UX C SIP Stack Programmer’s Guide
Server Authentication Implementation
Figure 10-2 shows the event flow of a successful server authentication
procedure.
Figure 10-2 Server Authentication Event Flow
Sample Code
The following code demonstrates the implementation of the
RvSipCallLegAuthCredentialsFoundEv callback function.
request
RvSipTransactionAuthBegin(hTransc)
RvSipTransactionCredentialsFoundEv(hTransc, header, isSupportedCredentails)
stateChangeEv
Application
Server Transaction
Layer
Client
Get Authorization headers from the
request message
RvSipTransactionAuthProceed(hTransc, SKIP_HEADER, NULL, NULL)
Get Next header.
RvSipTransactionCredentialsFoundEv(hTransc, header, isSupportedCredentails)
RvSipTransactionAuthProceed(hTransc, USE_PW, header, password)
Verify the header using the password.
assume success.
RvSipTransactionAuthCompletedEv(success)
RvSipTransactionRespond(200)
Check if authentication is needed
Check the given credentails.
assume unknown realm.
Get password from DB,
according to userName and
realm in given header