MrHuangJser 7386a70724 feat(cursor): auto-identify accounts from JWT sub for multi-account support
Previously Cursor required a manual ?label=xxx parameter to distinguish
accounts (unlike Codex which auto-generates filenames from JWT claims).

Cursor JWTs contain a "sub" claim (e.g. "auth0|user_XXXX") that uniquely
identifies each account. Now we:

- Add ParseJWTSub() + SubToShortHash() to extract and hash the sub claim
- Refactor GetTokenExpiry() to share the new decodeJWTPayload() helper
- Update CredentialFileName(label, subHash) to auto-generate filenames
  from the sub hash when no explicit label is provided
  (e.g. "cursor.8f202e67.json" instead of always "cursor.json")
- Add DisplayLabel() for human-readable account identification
- Store "sub" in metadata for observability
- Update both management API handler and SDK authenticator

Same account always produces the same filename (deterministic), different
accounts get different files. Explicit ?label= still takes priority.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 17:40:02 +08:00
2026-03-16 00:36:19 +08:00
2025-09-25 10:32:48 +08:00
2026-03-25 10:14:14 +08:00
2026-03-10 22:20:40 +04:00
2025-10-15 11:47:35 +08:00
2026-03-16 00:36:19 +08:00
2025-09-25 10:32:48 +08:00
2026-02-19 04:42:35 +08:00
2026-03-24 00:43:26 +08:00
2026-03-23 15:23:18 +09:00
2026-03-25 10:14:14 +08:00

CLIProxyAPI Plus

English | Chinese

This is the Plus version of CLIProxyAPI, adding support for third-party providers on top of the mainline project.

All third-party provider support is maintained by community contributors; CLIProxyAPI does not provide technical support. Please contact the corresponding community maintainer if you need assistance.

The Plus release stays in lockstep with the mainline features.

Contributing

This project only accepts pull requests that relate to third-party provider support. Any pull requests unrelated to third-party provider support will be rejected.

If you need to submit any non-third-party provider changes, please open them against the mainline repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Description
No description provided
Readme MIT 297 MiB
Languages
Go 99.7%
Shell 0.2%