Closed Bug 781258 Opened 12 years ago Closed 11 years ago

Add receipt reissue API

Categories

(Marketplace Graveyard :: API, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: anant, Unassigned)

References

Details

Bug 745319 needs an API to refresh receipts automatically. Currently, the refresh URL present in a the receipt is a user facing HTML page (as per bug 745850) which required the user to login.

A simple API might look like a POST to marketplace.mozilla.org/app/reissue with the old receipt that returns a new receipt whose expiry has been extended. Since the old receipt is presented and can be verified, additional authentication is not required.
(In reply to Anant Narayanan [:anant] from comment #0)
> Bug 745319 needs an API to refresh receipts automatically. Currently, the
> refresh URL present in a the receipt is a user facing HTML page (as per bug
> 745850) which required the user to login.
> 
> A simple API might look like a POST to marketplace.mozilla.org/app/reissue
> with the old receipt that returns a new receipt whose expiry has been
> extended. Since the old receipt is presented and can be verified, additional
> authentication is not required.

Anant, I think we can add the receipt refresh as part of the implementation of the existing getSelf() call. Adding an API would allow Marketplace to explicitly refresh receipts for users who visit Marketplace, but that's mostly a nice-to-have, right?
No, this bug is about exposing a RESTish call at the Marketplace server so that the WebRT can refresh receipts without user intervention. The URL that is present in the "reissue" property of receipts that are being issued currently is a user-facing page, not an API endpoint.
There is a proposed API for this here:

https://wiki.mozilla.org/Apps/WebApplicationReceiptRefresh

There is a roughed in version from bug 745850 which will need to be updated to deal with however the client is going to handle it.
That API looks great, Andy. I was a little confused by bug 745850 because it renders a HTML page; but is the behaviour actually according to the API in the wiki page?
The behaviour of the page does not match the API because I wasn't sure how the client was going to implement it and wether it was going to require user input or not etc. 

That's why I left this bug open, if the API works, we'll alter the page to look like it in this bug.
The reissue API is there in mkt/receipts, there's no point in doing more until Fx has the API though.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.