locked
How to logout from the application, which uses UCWA. RRS feed

  • Question

  • I am using the sample "UCWA June 2013 Samples" to create my own application. Is there any way to have a status "Offline" , in addition to status like "Away", "Busy", etc. so that when I select it, the logged in user is logged out. Is there any way to handle this?

    Regards,

    Praveen

    Tuesday, September 24, 2013 12:09 PM

Answers

  • To put a user into an 'Offline' state it is as simple as making a DELETE request on the root application Url:

    https://lyncweb.domain.com/ucwa/oauth/v1/applications/unique_id

    It should be noted that if the user is active on multiple devices you may not see them as 'Offline' immediately.  The UCWA application will also be cleaned up shortly after the DELETE (all requests on resources will return 404).

    Tuesday, September 24, 2013 1:02 PM

All replies

  • To put a user into an 'Offline' state it is as simple as making a DELETE request on the root application Url:

    https://lyncweb.domain.com/ucwa/oauth/v1/applications/unique_id

    It should be noted that if the user is active on multiple devices you may not see them as 'Offline' immediately.  The UCWA application will also be cleaned up shortly after the DELETE (all requests on resources will return 404).

    Tuesday, September 24, 2013 1:02 PM
  • Thanks ShelbyZ!!
    Tuesday, September 24, 2013 2:25 PM
  • When I make the mentioned changes, the user is going Offline successfully, also the other user who has subscribed for presence of that user, getting the acknowledgment when I use the firebug in my Firefox browser.

    But the following code never worked and its not updating the presence as offline,

    site.ucwa.Events.addEventHandlers({
    rel: "contactPresence"
    },

       updated:function (data) {

         // This never get called when the subscribed user go offline.

         // Here I have handled the presence change

        }

    }

    This is the response I could see in the Firebug,

    {"availability":"Offline","deviceType":"Unknown","lastActive":"\/Date(1380117966000)\/","_links":{"self":{"href":"/ucwa/oauth/v1/applications/103897496982/people/fernandoc860@gotuc.net/presence"}},"rel":"contactPresence"}

    Any one could help me in this?

    Regards,

    Praveen

     
    Wednesday, September 25, 2013 7:14 AM