×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    20

    Http resources protected with basic authentication

    Hi,

    Why are the http resources protected with basic authentication not available anymore?
    I get all the data from services with basic authentication to show in the application.
    It doesn't make sense for the user to enter a username and password to use the application.

    Thank you!

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Http resources protected with basic authentication

    What resources are you talking about ?

  3. #3
    Registered User
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    20

    Re: Http resources protected with basic authentication

    I did a symbian web runtime app and I get the data with a javascript ajax call to a web service that has basic authentication.
    This web service replies with a xml with the data I need and I parse it with javascript to show inside the app.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Http resources protected with basic authentication

    And excatly where in there are you having problems ?

  5. #5
    Registered User
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    20

    Re: Http resources protected with basic authentication

    Since the new update in Symbian Browser (Anna) when I open the application a login box opens to enter the username and password.
    So the users can't access the application.

  6. #6
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Http resources protected with basic authentication

    Hi,

    Indeed there seems to be issue with the Browser 7.3.1.37 on passing username and password
    Code:
    xmlHttpReq.open("GET", url,true, user, pass); //does not work
    What you can do to workaround this problem is to generate Authorization header by yourself.

    You'll need base64 encoded username and password pair separated by semicolon. I was using following library and it worked OK.
    http://www.webtoolkit.info/javascript-base64.html
    Code:
    var auth = Base64.encode(user+':'+pass);
    Then in XMLHttpRequest set custom Authorization Header and declare it to be "Basic" type.
    Code:
    xmlHttpReq.setRequestHeader("Authorization", "Basic "+auth);

    Please note that in URL authentication support was dropped intentionally. If your widget was using it, please start using the workaround.
    http://www.developer.nokia.com/Commu...in_Browser_7.3

    Br,
    Ilkka

  7. #7
    Registered User
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    20

    Re: Http resources protected with basic authentication

    Thanks a lot!
    It worked really well!

Similar Threads

  1. Widget http Basic authentication
    By nuker85 in forum Symbian
    Replies: 1
    Last Post: 2011-02-24, 11:27
  2. Basic authentication problem in HTTP client
    By kkc_123 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2010-04-08, 14:05
  3. realm for BASIC http authentication
    By astrograph in forum General Messaging
    Replies: 1
    Last Post: 2004-11-25, 12:08
  4. HTTP Basic Authentication on 6230
    By cschrauf in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2004-09-01, 01:29
  5. HTTP Basic authentication problem (MIDP1.0)
    By heccomm in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2004-01-16, 18:03

Posting Permissions

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