Hello All,

By the way, it could be that I don't understand something about the
registration/authentication concept implemented in sofia-sip.  Given this
scenario where the username or password is incorrect, then as the phone
periodically retries registration, a user must EITHER correct the
username/password in the phone OR correct the username/password in the
server.

Is sofia-sip smart enough to know that if the username/password is changed
at either endpoint, then it will then add the authentication header to the
REGISTER message (in reply to the 401)?

Best Regards,
Jerry



-----Original Message-----
From: Jerry Richards [mailto:jer...@tonecommander.com] 
Sent: Friday, March 13, 2009 8:03 AM
To: 'sofia-sip-devel@lists.sourceforge.net'
Cc: 'pekka.pe...@nokia.com'; 'mikhail.zabal...@nokia.com'
Subject: RE: 904 No Matching Challenge

Hello All,

Okay, I tried setting AUTHTAG_EXPIRES(1) and AUTHTAG_CACHE_ERRORS(1), but
neither of these fixed the problem, that is, where nua_register() retries
did not reply with the authentication header (only the first nua_register()
call does).

However, Mikhail's suggestion of commenting out the auc_clear_credentials()
call in nua_base_client_check_restart() function works.  Now subsequent
nua_register() calls include the authentication header in the 401 reply.

Perhaps I should explain my implementation:  I first call nua_register()
from my app.  When 401 is received, I call nua_authenticate().  If the
username/password is bad, my app receives the 904 No matching challenge upon
receipt of the 2nd 401 reply.  Then I wait 30 seconds and start the process
again.

Do you know any pitfalls I might encounter if I leave the
auc_clear_credentials() call commented out?

Best Regards,
Jerry


-----Original Message-----
From: mikhail.zabal...@nokia.com [mailto:mikhail.zabal...@nokia.com]
Sent: Friday, March 13, 2009 1:42 AM
To: jer...@tonecommander.com
Cc: sofia-sip-devel@lists.sourceforge.net; pekka.pe...@nokia.com
Subject: RE: 904 No Matching Challenge

Hi,

>-----Original Message-----
>From: ext Jerry Richards [mailto:jer...@tonecommander.com]
>Sent: Thursday, March 12, 2009 10:57 PM
>To: Zabaluev Mikhail (Nokia-D/Helsinki)
>Cc: sofia-sip-devel@lists.sourceforge.net
>Subject: RE: 904 No Matching Challenge
>
>Could you send me a patch (or point out the code) for what you 
>described below?
>
>"When I removed the line that invalidated the cached challenge upon 
>authentication failure, ..."

Ehm, it wasn't strictly a patch, I was just experimenting.
I did it against an older tree. There have been code movements in nua
recently, so I dropped it for a clean update.
I will try to redo it and check when I have more time. Look for a comment
like "Bad username/password pair" in the nua code. Pekka may know better
where the line is now.

Best regards,
  Mikhail


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to