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
F3379690: D10912.id36576.diff
Wed, Nov 27, 6:28 PM
Unknown Object (File)
Sun, Nov 24, 1:52 AM
Unknown Object (File)
Sun, Nov 24, 1:25 AM
Unknown Object (File)
Sat, Nov 23, 11:34 PM
Unknown Object (File)
Fri, Nov 8, 10:03 PM
Unknown Object (File)
Fri, Nov 8, 7:15 PM
Unknown Object (File)
Fri, Nov 8, 7:15 PM
Unknown Object (File)
Fri, Nov 8, 7:15 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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #36576)

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