×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    30

    MWS REST API with access control

    Hi,

    I have problem with MWS (1.4) and REST API with access rights.

    I created a new user in phone Contacts and added this as a user in MWS with
    password. I then went to MWS Presence page and allowed this new user to have
    access to my location.

    If I logged into my mobilesite.net as this new user, I could see my phones
    location as I should be. But if I tried to use REST API call from the web
    browser (i.e. http://<domain_name>/rest/presence/location ) then it does
    prompt me a window asking username & password but returns always with
    '401 Authorization Required' even though I give the correct name & passwd.

    Anyone got REST API to work with access control?

    --Timo

  2. #2
    Regular Contributor
    Join Date
    Apr 2008
    Location
    Charlotte, NC, USA
    Posts
    79

    Re: MWS REST API with access control

    Did you make sure to give the user that you created Access Rights to view the page by going to the page's Access Rights settings?
    http://antoinerjwright.com - an MWS hosted site

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    30

    Re: MWS REST API with access control

    Yes, if I log in as this new user, I can then see my location in Presence
    page. So the access rights should be ok.

    Btw. I have have logged in, then the browser seems to remember my credentials
    and the REST API call also works. But this is not the way I want to use the
    API calls. Does the the REST API use different access control mechanism than
    the MWS's normal web pages?

    --Timo

  4. #4
    Nokia Developer Expert
    Join Date
    Sep 2007
    Posts
    60

    Re: MWS REST API with access control

    Does this help?

    http://wiki.forum.nokia.com/index.ph...eb_Server_APIs

    NOTES Allowing anonymous access to one of the presence resources causes the authentication for the other two resources to stop working in some configurations. The authentication should still always work when connection filtering is on or if the user first logs in through the MWS web pages.

  5. #5
    Registered User
    Join Date
    Oct 2004
    Posts
    30

    Re: MWS REST API with access control

    Quote Originally Posted by jukkaekl View Post

    The authentication should still always work when connection filtering is on or if the user first logs in through the MWS web pages.
    Ok, it works If I select Settings -> Traffic filtering -> Anonymous
    then the server accepts the username & password and I get the location data.

    The side effect from this is that no anonymous traffic can be accepted to my
    MWS anymore. Even though I explicitly allowed some services to have anonymous
    access it will anyway to prompt for username&passwd. If only both normal
    anonymous access and REST access control would work together...

    --Timo

Similar Threads

  1. Access Phone's inbuilt applications Using J2ME api
    By nirajpendal in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2008-08-22, 10:43
  2. MWS Rest API feedback
    By robsroom in forum Mobile Web Server
    Replies: 3
    Last Post: 2008-07-08, 08:21
  3. how to control access to applications ?
    By shadi.alalem in forum Symbian
    Replies: 2
    Last Post: 2007-03-07, 03:38
  4. Access list control declared in dialog resources
    By Steve_Johnson in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-07-17, 12:21
  5. Sequence to access phone control
    By khanming in forum Symbian
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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