Skip to content

chore(dxfeed): add script to generate token#136

Open
mariocao wants to merge 1 commit into
mainfrom
feat/dxfeed-token
Open

chore(dxfeed): add script to generate token#136
mariocao wants to merge 1 commit into
mainfrom
feat/dxfeed-token

Conversation

@mariocao
Copy link
Copy Markdown
Member

Motivation

We occasionally need to manually generate dxFeed self-signed auth tokens (e.g. for the dxFeed module's dxfeedAuthToken), but had no convenient way to do so.

Explanation of Changes

Added a small interactive script (workspace/data-proxy/src/scripts/generate-dxfeed-token.ts) that prompts for the issuer, secret, session, message and validity (days), then builds an HMAC-SHA256 self-signed token per the dxFeed token spec. It uses Bun's built-in prompt() and native node:crypto, so no new dependencies. Wired up as the gen:dxfeed-token script in the root package.json.

Testing

bun run gen:dxfeed-token

Follow the prompts; the script prints the payload, expiry, and final token.

@mariocao mariocao requested a review from a team May 29, 2026 14:09
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.

2 participants