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)
Thu, Nov 14, 2:51 PM
Unknown Object (File)
Sun, Nov 10, 10:43 PM
Unknown Object (File)
Sun, Nov 10, 8:14 PM
Unknown Object (File)
Sat, Nov 9, 3:28 PM
Unknown Object (File)
Sat, Nov 9, 8:41 AM
Unknown Object (File)
Thu, Nov 7, 1:52 PM
Unknown Object (File)
Thu, Nov 7, 1:51 PM
Unknown Object (File)
Thu, Nov 7, 1:51 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