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

DEVX-8994: Change default client tokens to JWT #274

Merged
merged 8 commits into from
Dec 12, 2024

Conversation

superchilled
Copy link
Contributor

@superchilled superchilled commented Nov 13, 2024

This PR adds the ability to create JWT client tokens and sets this as the default, with the option to create T1 tokens if the user specifies this. Specifically the PR:

  • Updates the token creation logic to accept an optional token_type param in the generate_token method:
    • The param has two acceptable values: 'T1' and 'JWT'
      • If 'T1' is set, a T1 token is generated
      • If 'JWT' is set, or if the token_type param is ommitted, a JWT is generated
  • Updates existing unit tests and add new unit tests to cover the amended and added functionality

@superchilled
Copy link
Contributor Author

Warning

Do not merge/deploy until @dragonmantank has confirmed this can go out.

@@ -28,6 +28,7 @@ module OpenTok
# Generates a token.
#
# @param [Hash] options
# @option options [String] :token_type The type of token to generate. Must be one of 'T1' or 'JWT'.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeffswartz I think we'll need to update the OT docs here and here to cover this new param.

@@ -36,6 +36,7 @@ module OpenTok
# the token.
#
# @param [Hash] options A hash defining options for the token.
# @option options [String] :token_type The type of token to generate. Must be one of 'T1' or 'JWT'.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeffswartz I think we'll need to update the OT docs here and here to cover this new param.

@superchilled superchilled merged commit 73f4828 into main Dec 12, 2024
13 checks passed
@superchilled superchilled deleted the devx-8994-change-default-client-tokens-to-jwt branch December 12, 2024 10:16
@superchilled superchilled restored the devx-8994-change-default-client-tokens-to-jwt branch December 13, 2024 16:31
superchilled added a commit that referenced this pull request Dec 13, 2024
superchilled added a commit that referenced this pull request Dec 13, 2024
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