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
F3171972: D12934.id42927.diff
Thu, Nov 7, 1:52 PM
F3171960: D12934.id43224.diff
Thu, Nov 7, 1:51 PM
F3171935: D12934.id42927.diff
Thu, Nov 7, 1:51 PM
F3171389: D12934.id.diff
Thu, Nov 7, 1:37 PM
F3169282: D12934.id.diff
Thu, Nov 7, 10:34 AM
Unknown Object (File)
Thu, Nov 7, 9:09 AM
Unknown Object (File)
Mon, Nov 4, 7:42 AM
Unknown Object (File)
Sat, Nov 2, 2:47 AM
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