Skip to content

Add revokeToken() function for client #739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kavin-kr
Copy link

@kavin-kr kavin-kr commented Jul 4, 2025

Implement the revokeToken() function in the client library to allow clients to revoke tokens on the server.

Motivation and Context

The client library was missing OAuth token revocation functionality, which is essential for proper token lifecycle management and security best practices. While the server already supports token revocation (RFC 7009), clients had no way to programmatically revoke tokens during logout or cleanup scenarios.

This closes the gap in the OAuth implementation by providing client-side token revocation that integrates seamlessly with the existing OAuth client architecture.

How Has This Been Tested?

  • Unit tests: Added comprehensive test cases covering all functionality
  • Error scenarios: Validated HTTP error handling (400, 401, 500, network errors)
  • Build verification: All existing tests pass, build succeeds

Breaking Changes

None. This is a purely additive change that doesn't modify any existing APIs or behavior.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

None

Implement the revokeToken() function in the client library to allow clients to revoke tokens on the server.
@ihrpr ihrpr added this to the auth milestone Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants