feat(oauth): Add refresh to oauthdevice.Client#1227
feat(oauth): Add refresh to oauthdevice.Client#1227burmudar merged 3 commits intowb/add-oauth-device-flowfrom
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
keegancsmith
left a comment
There was a problem hiding this comment.
did you test what happens if someone revokes src-cli and then you try refresh a token / use an old token? I'm interested to know if the error message you show users is possible to debug as that being the issue.
Noopee! Def a good call out - I'll make sure to test it |
fd1668e to
1565618
Compare
2f24f44 to
7f2c665
Compare
1565618 to
9a04958
Compare
7f2c665 to
87b5732
Compare
9a04958 to
c1c82ec
Compare
87b5732 to
abd0850
Compare
Tried the above scenario and the only error we get back is "Invalid OAuth Token". We catch it in #1228 and then guide the user to re-run |
c1c82ec to
61a1070
Compare
abd0850 to
f79c981
Compare
* add refresh to oauthdevice.Client * add OAuth Transport and use it if no access token * secrets: switch to zalando/go-keyring and add context support * secrets: scope keyring by endpoint
…Auth client (#1223) * removed unused func * add refresh token to device response unmarshall * make NewClient take ClientID as param * add oauth flow and use oauth token when SRC_ACCESS_TOKEN is empty * feat(oauth): Add refresh to oauthdevice.Client (#1227) * add refresh to oauthdevice.Client * oauthdevice: add RefreshToken field and Refresh method * feat(oauth): Use keyring to store oauth token (#1228) * add refresh to oauthdevice.Client * add OAuth Transport and use it if no access token * secrets: switch to zalando/go-keyring and add context support * secrets: scope keyring by endpoint
…Auth client (#1223) * removed unused func * add refresh token to device response unmarshall * make NewClient take ClientID as param * add oauth flow and use oauth token when SRC_ACCESS_TOKEN is empty * feat(oauth): Add refresh to oauthdevice.Client (#1227) * add refresh to oauthdevice.Client * oauthdevice: add RefreshToken field and Refresh method * feat(oauth): Use keyring to store oauth token (#1228) * add refresh to oauthdevice.Client * add OAuth Transport and use it if no access token * secrets: switch to zalando/go-keyring and add context support * secrets: scope keyring by endpoint (cherry picked from commit 0bc535e)
…Auth client (#1223) * removed unused func * add refresh token to device response unmarshall * make NewClient take ClientID as param * add oauth flow and use oauth token when SRC_ACCESS_TOKEN is empty * feat(oauth): Add refresh to oauthdevice.Client (#1227) * add refresh to oauthdevice.Client * oauthdevice: add RefreshToken field and Refresh method * feat(oauth): Use keyring to store oauth token (#1228) * add refresh to oauthdevice.Client * add OAuth Transport and use it if no access token * secrets: switch to zalando/go-keyring and add context support * secrets: scope keyring by endpoint (cherry picked from commit 0bc535e)
add refresh to oauthdevice.Client
oauthdevice: add RefreshToken field and Refresh method
Test plan