Skip to content

Add logout command#10

Open
daveliu wants to merge 2 commits into
mainfrom
feature/logout-command
Open

Add logout command#10
daveliu wants to merge 2 commits into
mainfrom
feature/logout-command

Conversation

@daveliu

@daveliu daveliu commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Closes #3.

Adds a logout command that revokes the current server session and removes the stored CLI credentials.

Changes

  • Add config::remove_config, which deletes the config file and reports whether one existed.
  • Add an authenticated DELETE /my/session request before local credentials are removed.
  • Keep the config intact if server-side revocation fails.
  • Print a clear message for both the logged-in and not-logged-in cases.
  • Document blackcandy logout in the README.

Validation

  • cargo fmt --check
  • cargo test
  • cargo clippy -- -D warnings

@daveliu daveliu mentioned this pull request Jul 1, 2026

@aidewoode aidewoode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also called DELETE /my/session to delete session on server side. otherwise we will have orphan session records

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logout command

2 participants