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
Unknown Object (File)
Mon, Dec 16, 10:23 PM
Unknown Object (File)
Mon, Dec 16, 10:23 PM
Unknown Object (File)
Mon, Dec 16, 10:23 PM
Unknown Object (File)
Mon, Dec 16, 10:23 PM
Unknown Object (File)
Fri, Nov 29, 1:09 AM
Unknown Object (File)
Thu, Nov 28, 6:13 PM
Unknown Object (File)
Nov 26 2024, 4:51 AM
Unknown Object (File)
Nov 25 2024, 9: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