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)
Tue, Sep 10, 6:25 AM
Unknown Object (File)
Mon, Sep 9, 12:26 PM
Unknown Object (File)
Sat, Sep 7, 11:06 AM
Unknown Object (File)
Sat, Sep 7, 11:04 AM
Unknown Object (File)
Fri, Sep 6, 11:52 PM
Unknown Object (File)
Fri, Sep 6, 11:52 PM
Unknown Object (File)
Fri, Sep 6, 8:23 PM
Unknown Object (File)
Fri, Sep 6, 6:39 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
No Lint Coverage
Unit
No Test Coverage

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

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

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

tested and improved in latest revision