Loop/Architecture/Rooms: Difference between revisions

Line 259: Line 259:


Because providing this information to users who are not in the room would be surprising for those in the room, we only allow the room owner and users in the room to access this method. Room owners are authenticated via their HAWK credentials, while room participants are authenticated via the sessionToken bearer token provided to them when they joined the room.
Because providing this information to users who are not in the room would be surprising for those in the room, we only allow the room owner and users in the room to access this method. Room owners are authenticated via their HAWK credentials, while room participants are authenticated via the sessionToken bearer token provided to them when they joined the room.
Desktop users:


  GET /rooms/3jKS_Els9IU HTTP/1.1
  GET /rooms/3jKS_Els9IU HTTP/1.1
Line 268: Line 266:
  Host: localhost:5000
  Host: localhost:5000


Standalone Client Users:
* For a desktop client user, the "Authorization" header field is populated with the HAWK token (using a scheme of "Hawk"), just like it is for other requests.
 
* For the standalone client, the "Authorization" header field is encoded using [http://tools.ietf.org/html/rfc1945#section-11.1 Basic authentication]. The user ID portion is the sessionToken provided to the user when they joined the room, and the password is blank.
GET /rooms/3jKS_Els9IU?'''sessionToken=T1==cGFydG5lcl9pZD00NDY2OTEwMiZzaW''' HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Host: localhost:5000
 
* '''sessionToken''' - sessionToken provided to user when they joined the room.


Response:


  HTTP/1.1 200 OK
  HTTP/1.1 200 OK
Confirmed users
632

edits