Page MenuHomePhabricator

[web] Pass CSAT to Blob service when fetching multimedia
ClosedPublic

Authored by bartek on Feb 1 2024, 5:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 14, 6:29 AM
Unknown Object (File)
Mon, Oct 14, 1:44 AM
Unknown Object (File)
Oct 3 2024, 11:47 PM
Unknown Object (File)
Oct 3 2024, 11:47 PM
Unknown Object (File)
Oct 3 2024, 11:47 PM
Unknown Object (File)
Oct 3 2024, 11:47 PM
Unknown Object (File)
Oct 3 2024, 11:46 PM
Unknown Object (File)
Oct 3 2024, 11:46 PM
Subscribers

Details

Summary

Same as D10910 but for web - modified fetchAndDecryptMedia() to accept auth metadata.

Depends on D10910

Test Plan

Repeated test plan from D10910, but on web.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Feb 1 2024, 5:47 AM

Replace convenient hook with imperative calls

tomek added inline comments.
web/media/encrypted-multimedia.react.js
47–62

As in the previous diff, we can consider introducing a new hook that makes it more convenient, e.g.

function useFetchAndDecryptMedia() {
  const identityContext = React.useContext(IdentityClientContext);
  ...
  return React.useCallback((
        blobURI,
        encryptionKey
  ) => {
    const authMedatata = await getAuthMetadata();
    return fetchAndDecryptMedia(
        blobURI,
        encryptionKey,
        authMedatata,
      );
  }
}
This revision is now accepted and ready to land.Feb 6 2024, 1:28 AM

Add hook for fetchAndDecryptMedia