wpt icon indicating copy to clipboard operation
wpt copied to clipboard

[eme] Refactor messagehandler

Open mwatson2 opened this issue 10 years ago • 3 comments

The messagehandler class / method was implemented quickly under a previous deadline and has since been extended repeatedly to support new requirements, including:

  • explicit assetIds and variantIds
  • different session types
  • expiration times

The resulting code is messy and difficult to understand. It would benefit from a fresh approach.

mwatson2 avatar Sep 28 '16 20:09 mwatson2

PR #3870

mwatson2 avatar Oct 04 '16 18:10 mwatson2

Please briefly comment on the usage of assetIds and especially variantIds in the test suite.

jdsmith3000 avatar Oct 05 '16 18:10 jdsmith3000

assetId and varientId are configured against each key in the DRMToday database.

With proxy server or test dummy authentication, the DRMToday server identifies the required key(s) by key id (it returns all the keys with the same assetId and variantId as the requested one).

This model doesn't work with upfront token authentication (which we need to obtain licenses with expiration of our choice). I think DRMToday want to move away from this model also, so that the same file (with same key, keyid) could appear in multiple assets.

So, we need to provide the assetId and variantId for the key that we want in the request to DRMToday (or just the assetId if we want multiple keys and there are no variantIds configured).

mwatson2 avatar Oct 05 '16 19:10 mwatson2