Page MenuHomePhabricator

[Tunnelbroker] Implement client method to get WNS token
ClosedPublic

Authored by varun on Jul 30 2024, 12:02 AM.
Tags
None
Referenced Files
F3385592: D12934.id43224.diff
Fri, Nov 29, 1:09 AM
F3383900: D12934.id43225.diff
Thu, Nov 28, 6:13 PM
Unknown Object (File)
Tue, Nov 26, 4:51 AM
Unknown Object (File)
Mon, Nov 25, 9:14 PM
Unknown Object (File)
Fri, Nov 22, 5:41 AM
Unknown Object (File)
Thu, Nov 14, 2:51 PM
Unknown Object (File)
Sun, Nov 10, 10:43 PM
Unknown Object (File)
Sun, Nov 10, 8:14 PM
Subscribers

Details

Summary

We need an oauth2 access token to supply as the bearer token when we send push notifs

Depends on D12933

Test Plan

successfully logged access token from WNS server

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun held this revision as a draft.
varun published this revision for review.Jul 30 2024, 12:04 AM

Can you also test refreshing the token after expiry_window_in_secs?

services/tunnelbroker/src/notifs/wns/mod.rs
66–69 ↗(On Diff #42927)

can you test that case and improve it if needed? (e.g. add response.body()).

I want to make sure that in case of failure, we'll log detailed errors of what went wrong

This revision is now accepted and ready to land.Jul 30 2024, 2:57 AM
bartek added inline comments.
services/tunnelbroker/src/notifs/wns/mod.rs
36 ↗(On Diff #42927)

Should work. Duration::from_secs is a const fn so this is calculated once during compilation

services/tunnelbroker/src/notifs/wns/mod.rs
66–69 ↗(On Diff #42927)

tested and improved in latest revision