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

Swap 3206 - Added custom jwt token creation #438

Merged
merged 4 commits into from
Apr 12, 2023
Merged

Swap 3206 - Added custom jwt token creation #438

merged 4 commits into from
Apr 12, 2023

Conversation

nitrosx
Copy link
Contributor

@nitrosx nitrosx commented Apr 12, 2023

Description

This PR adds a new endpoint under users to create a custom jwt for the user specified.

Motivation

Ingestion in most facilities is done by automated processes. It is hard to guarantee success of ingestion when we rely on username and password to generate a time-limited token. With this PR, admin users can create jwt token with no expiration that can be used in this kind of use case.

Changes:

  • userController: added /jwt endpoint to create jwt token for user with id with custom expiration date that can be used only by admin users
  • userService: added functionality to create a custom jwt
  • casl: added UserCreateJwt action and permission to create jwt token

Tests included/Docs Updated?

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)
  • Docs updated?
  • New packages used/requires npm install?
  • Toggle added for new features?

@nitrosx nitrosx merged commit f6f8f92 into master Apr 12, 2023
@nitrosx nitrosx deleted the swap-3206 branch April 12, 2023 12:14
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