readium-lcp-server icon indicating copy to clipboard operation
readium-lcp-server copied to clipboard

Add a "self" relation to license status documents

Open jotson opened this issue 1 year ago • 0 comments

Is it possible to add a "self" relation to license status documents? Something like this in license_status.go:makeLinks():

link := licensestatuses.Link{Href: lsdBaseURL + "/licenses/" + ls.LicenseRef + "/status", Rel: "self", Type: api.ContentType_LSD_JSON, Templated: false}
*links = append(*links, link)

If you're willing, I can submit a PR. Please let me know if you have any special requirements for it.

Background:

We're doing an OPDS2+ODL^1 implementation with LCP for library lending.

When a client performs a "checkout" we ask the lcp server to generate a new license. The ODL spec requires the response to a "checkout" to be a License Status Document. Our problem is that the License Status Document doesn't link to itself so there's no way for the client to query the status again in the future.

jotson avatar Sep 26 '24 19:09 jotson