[CLI-2360] Revoking Auth0 refresh token on cloud logout
Release Notes
Bug Fixes
confluent logoutrevokes the refresh token when logging out of Confluent Cloud
Checklist
- [CRUCIAL] Is the change for features that are already live in prod?
- yes: ok
What
Running confluent logout for cloud users now makes a request to DELETE /api/sessions.
References
https://confluentinc.atlassian.net/browse/CLI-2360 https://github.com/confluentinc/ccloud-sdk-go-v1-public/pull/24
Test & Review
Unit and integration tests still pass
Request returns a reply with code 200 OK.
Have you manually tested, that IsSSO field in get ccloud credentials is always correct?
Have you manually tested, that IsSSO field in get ccloud credentials is always correct?
yup! It's the same code that used to exist in login/command.go, but I just moved it to pkg since it is shared.
EDIT: did some refactoring and it turns out we don't even need to call the getCCloudCredentials function, since logout an authenticated command now.
I switched the target from main to v4 and worked out the merge conflicts, so I think this is ready for review again.