HomePhabricator
Diffusion Comm bda5c6e24f8e

[native] Pass CSAT to Blob service when fetching multimedia

Description

[native] Pass CSAT to Blob service when fetching multimedia

Summary:
Modified fetchAndDecryptMedia() to accept authMetadata argument and pass it as Authorization header with Blob service requests.

Depends on D10907, D10908

Test Plan:

  • Enabled encrypted media and blob service, sent a multimedia message
  • Modified blob handlers the same way as in D10908 test plan
  • Opened chat on native - the multimedia loads correctly, blob service logs contain auth metadata:
INFO get_blob{blob_hash=xn2ILjHR45XHsbjNf_wRalWNjusWtCNntiutX1eJn0w}: blob::http::handlers::blob: Get blob request auth=UserToken(UserIdentity { user_id: "foo", access_token: "baz", device_id: "9/Dk+21eU27n7fpvFDVWqNrouje2XKGW2jtLPC7vx+A" })
`

Reviewers: atul, tomek, inka, michal

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D10910

Details

Provenance
bartekAuthored on Feb 1 2024, 2:01 AM
Reviewer
tomek
Differential Revision
D10910: [native] Pass CSAT to Blob service when fetching multimedia
Parents
rCOMM2af4e3fcfc48: [lib][native][web] useIdentityWalletLogIn() hook
Branches
Unknown
Tags
Unknown