×

Discussion Board

Results 1 to 6 of 6

Hybrid View

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    11

    http digest authentication

    Hello,

    I use the WebClient example in S60 3rd FP2 SDK to access a server which needs digest authentication. I am sure the username and password are correct but it keeps failing to pass the authentication. I capture the packet sent from client and found there are actually response field included. I make a calculation with MD5 and check that the value is correct. Why did the server keep rejecting?

    Best regards,
    Toby

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,570

    Re: http digest authentication

    You may attempt reproducing the issue manually, using telnet. Of course it requires the server to tolerate your slowness, but at least it is something to try.
    If you are already in capturing packets, you could capture what others are sending (like the browser on the device or on your PC), and of course check if they succeed actually.

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    11

    Re: http digest authentication

    Thanks for your reply first. After serveral tries, I found that this problem even occurs on native broswer of the device or simulator. The server is running properly since I can pass the authentication with the browser of my PC. I am wondering whether it is the problem of nokia HTTP class. The device just send the correct response code to server but it keeps failing to authenticate. The following is the captured packet.

    GET /view/viewer_index.shtml?id=66 HTTP/1.1

    Host: 192.168.1.183

    Accept: text/html,text/css,multipart/mixed,application/java-archive, application/java, application/x-java-archive, text/vnd.sun.j2me.app-descriptor, application/vnd.oma.drm.message, application/vnd.oma.drm.content, application/vnd.oma.dd+xml, application/vnd.oma.drm.rights+xml, application/vnd.oma.drm.rights+wbxml, application/x-nokia-widget, */*

    Accept-Charset: iso-8859-1, utf-8; q=0.7, *; q=0.7

    Accept-Encoding: gzip, deflate, x-gzip, identity; q=0.9

    Accept-Language: en

    Authorization: Digest username="root", realm="AXIS_00408CA63BAD", nonce="00023df0Y80168093a5520479ab11bf0ee4b6dc5f74521", response="02d06b9f40b7df2c5dc5f1404b971282", uri=/view/viewer_index.shtml?id=66, qop="auth", cnonce="cd1cab6607c177753729384596c35608", nc=00000001

    User-Agent: Mozilla/5.0 (SymbianOS/9.2; U; [en]; Series60/3.2 Nokia3250/1.00; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413

    x-wap-profile: "http://nds1.nds.nokia.com/uaprof/N3250r100.xml"

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    11

    Re: http digest authentication

    I found where the problem is but I dont know why. The parameter cnonce used in Authorization which is a random number generated by symbian device is 32 bytes long, however I noticed the cnonce generated by the browser of my PC was 16 bytes long. I tried manually add the authorization field with16 byte long cnonce parameter and it worked. Perhaps the server doesnt accept cnonce longer than 16bytes? Or can I do something to change the length of the cnonce if I want to use the built in Digest authentication function?

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,570

    Re: http digest authentication

    If you check the related RFC, you will see that the definition is "cnonce-value = nonce-value", where "nonce-value = quoted-string", so it could be anything. It is a problem with the server if it really has a limitation, and especially if it is such a low character count.

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    11

    Re: http digest authentication

    Thanks for the support!!

Similar Threads

  1. How to perform HTTP basic and digest access Authentication using CSecureSocket class
    By pranav.jadhav in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2009-06-08, 09:33
  2. Http Digest Authentication in S60 2rd edition
    By lengyuecau in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-11-16, 10:04
  3. Why I can't pass the digest authentication?
    By ericfengjieming2007 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-11-14, 09:22
  4. About Http Digest Authentication with qop=auth-int
    By lengyuecau in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-07-31, 13:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •