Closed
Bug 1072184
Opened 11 years ago
Closed 11 years ago
Handle DELETE /account, /session and /registration
Categories
(Hello (Loop) :: Server, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alexis+bugs, Assigned: tarek)
Details
(Whiteboard: [qa+] [loop-server 0.13])
Attachments
(1 file)
Make sure there is more than one hawk session associated with the user.
If not answer with 403 Forbidden.
We can also return the method to use instead: DELETE /account.
Updated•11 years ago
|
Whiteboard: [qa+]
Updated•11 years ago
|
Assignee: nobody → rhubscher
Status: NEW → ASSIGNED
Summary: Add a way to destroy a hawk session (DELETE /session) → Destroy the hawk session on DELETE /registration
Comment 1•11 years ago
|
||
Now that SimplePushURLs are linked directly to the Hawk Session, it makes sense to remove both on DELETE /registration
Attachment #8500994 -
Flags: review?(alexis+bugs)
| Reporter | ||
Comment 2•11 years ago
|
||
Adding a note here while doing the triage: It's possible this is not doing the right thing here: it's deleting the hawkid of anonymous users (so they don't exist anymore).
Currently, this API allows user to unregister a simple push url, marking them as offline.
| Reporter | ||
Comment 3•11 years ago
|
||
Comment on attachment 8500994 [details] [review]
Link to Github PR — #220.
Yep, that's not how we want to do things for now: let's keep it possible to just unregister, which is what the current DELETE on /registration does (which is different from the DELETE /session).
Attachment #8500994 -
Flags: review?(alexis+bugs) → review-
Comment 4•11 years ago
|
||
Then we should probably remove the mandatory parameter in POST /registration because asking POST /registration with a fake simplePushURL and the asking for DELETE /registration will basically do the same thing.
| Reporter | ||
Comment 5•11 years ago
|
||
Nope, that's different: when you register, you need to pass a way to contact you back, and then you can say this is not valid anymore (using delete).
Effectively, that would do the same thing but they're conceptually different: post /registration registers you with a way to get back to you and delete /registration removes the way to contact you (e.g. you're offline).
Comment 6•11 years ago
|
||
I don't understand why you couldn't connect as an offline participant.
Also in that case we don't handle this correctly because then we should answer the link-clicker that the user is not present.
Are we supposed to handle the presence of a user on the server side?
Mark — Does current client implementation relies on this when going offline?
Flags: needinfo?(standard8)
| Reporter | ||
Comment 7•11 years ago
|
||
If that makes sense to register as an offline participant, then we could allow that behavior.
We're not supposed to handle all the presence of the users on the server side, but here that actually makes sense to have it for free, hence why we're doing it like that.
Comment 8•11 years ago
|
||
Ok so after further discussion here is what we are planning to implement:
- POST /registration will now have simplePushURLs optional
- POST /registration with simplePushURLs will override the session simplePushURLs
- DELETE /registration will remove simplePushURLs for the user putting him as offline without removing it ability to get back online.
- DELETE /session will remove the connected user session and drop its simplePushUrls
- DELETE /session on a unconnected user will raise a 403
- DELETE /account will remove a user and everything that it linked to it (call-urls/sessions)
Basically an unconnected user will have to use DELETE /account instead of DELETE /session because a drop of its session will not let him get its user data.
Comment 9•11 years ago
|
||
Seems reasonable, please ensure the documentation gets updated for this. It might also be worth a general section explaining the differences as per comment 8.
Flags: needinfo?(standard8)
| Assignee | ||
Updated•11 years ago
|
Assignee: rhubscher → tarek
| Assignee | ||
Updated•11 years ago
|
Summary: Destroy the hawk session on DELETE /registration → Handle DELETE /account, /session and /registration
| Reporter | ||
Updated•11 years ago
|
Whiteboard: [qa+] → [qa+] [loop-server 0.13]
Updated•11 years ago
|
Attachment #8500994 -
Flags: review- → review+
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 11•11 years ago
|
||
Documentation updated: https://github.com/mozilla-services/docs/commit/746c8f1b4e516bfac21adfba7c7965869aada627
You need to log in
before you can comment on or make changes to this bug.
Description
•