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

Specify kid when provided for JWT #339

Merged
merged 3 commits into from
Feb 10, 2023

Conversation

justinabrokwah-okta
Copy link
Contributor

@justinabrokwah-okta justinabrokwah-okta commented Feb 8, 2023

Allow for JWT to be encoded with kid in headers when provided by user

Addressing #289

headers = {}

# # Check if kid was supplied
if kid:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check if kid was provided in client config
if not, check in private key

@justinabrokwah-okta justinabrokwah-okta marked this pull request as ready for review February 9, 2023 16:51
@justinabrokwah-okta justinabrokwah-okta force-pushed the jabro-okta-525317-specify-kid-for-jwt branch from ed45f4e to 65f6e7d Compare February 9, 2023 16:51
Comment on lines +27 to +30
# check if kid is provided in config - set if so
kid = self._config["client"]["kid"] if "kid" in self._config["client"] else None

return JWT.create_token(org_url, client_id, private_key)
return JWT.create_token(org_url, client_id, private_key, kid)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checking for a key id in the config and using it if provided

Copy link
Contributor

@bryanapellanes-okta bryanapellanes-okta left a comment

Choose a reason for hiding this comment

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

🚢

@justinabrokwah-okta justinabrokwah-okta merged commit 4c48c8e into master Feb 10, 2023
@bryanapellanes-okta bryanapellanes-okta deleted the jabro-okta-525317-specify-kid-for-jwt branch December 12, 2023 15:48
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