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)
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
Unknown Object (File)
Fri, Nov 8, 7:15 PM
Unknown Object (File)
Fri, Nov 8, 1:36 PM
Unknown Object (File)
Fri, Nov 8, 1:06 PM
Unknown Object (File)
Fri, Nov 8, 11:53 AM
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