< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Using addAuthorization


Hi,

I am trying to use Helper::addAuthorization function.
When i send REGISTER to proxy, I get 401 response. I try to generate REGISTER request using addAuthorization function.
But the request generated still gets 401 from the proxy.

I am not sure why 'cnonce' and 'nc' are used. But looking into the Helper.cxx, I could see that it is used when qop option is set in challenge. In my case qop is not set. So I think they are not being used.

This is how I am calling addAuthorization when I receive 401 for REGISTER:

Data username = "imsTest";
Data password = "imsTest";
Data cnonce = "366fead6";
unsigned int nc = 0;

Data encodedPassword = password.md5();

Helper::addAuthorization(request, response, username, encodedPassword, cnonce, nc);

Can anybody tell me how to use it correctly? Is there any other way I can do the authorization.
I am not using dum.

Thanks,
Sonika