Skip to content
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

Fix setting custom TTL in gensubtoken cli #769

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Conversation

FZambia
Copy link
Member

@FZambia FZambia commented Jan 30, 2024

Proposed changes

Buggy behaviour (--ttl option did not work, default expiration was used):

./centrifugo gensubtoken --channel test --ttl 101010
HMAC SHA-256 JWT for anonymous user and channel "test" with expiration TTL 168h0m0s:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey....[STRIPPED]

Fixed behaviour:

./centrifugo gensubtoken --channel test --ttl 101010
HMAC SHA-256 JWT for anonymous user and channel "test" with expiration TTL 28h3m30s:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey....[STRIPPED]

@FZambia FZambia merged commit d77778b into master Jan 31, 2024
4 checks passed
@FZambia FZambia deleted the fix_sub_token_ttl branch January 31, 2024 05:51
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.

1 participant