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

feat(user): add single purpose token and auth #4470

Merged
merged 6 commits into from Apr 29, 2024

Conversation

apoorvdixit88
Copy link
Contributor

@apoorvdixit88 apoorvdixit88 commented Apr 26, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Add single purpose token and authentication for single purpose token. This token will serves as a intermediate token and used to perform a certain action only.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Closes #4478

How did you test it?

This can be tested with upcoming PRs for reset password, TOTP, accept invite etc. Single purpose token and auth will be used for that.
I also tested this locally, by changing auth type of change passwor and it was working as expected.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@apoorvdixit88 apoorvdixit88 added C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed A-users Area: Users labels Apr 26, 2024
@apoorvdixit88 apoorvdixit88 self-assigned this Apr 26, 2024
@apoorvdixit88 apoorvdixit88 requested review from a team as code owners April 26, 2024 10:52
@apoorvdixit88 apoorvdixit88 marked this pull request as draft April 26, 2024 10:53
@apoorvdixit88 apoorvdixit88 marked this pull request as ready for review April 29, 2024 09:36
user_id: String,
purpose: Purpose,
settings: &Settings,
) -> UserResult<String> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets make this Secret<String>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can cover this later, making this and other similar results as Secret, at present they all are same.

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Apr 29, 2024
Merged via the queue into main with commit c20ecb8 Apr 29, 2024
13 of 15 checks passed
@Gnanasundari24 Gnanasundari24 deleted the single-purpose-token branch April 29, 2024 12:39
pixincreate added a commit that referenced this pull request Apr 30, 2024
…to-env

* 'main' of github.com:juspay/hyperswitch:
  Refactor(core): remove payment_method_id from RouterData struct (#4485)
  fix(euclid_wasm): connector config wasm metadata update (#4460)
  chore(version): 2024.04.30.0
  feat(user): add single purpose token and auth (#4470)
  feat: stripe connect integration for payouts (#2041)
  feat(router): handle authorization for frictionless flow in external 3ds flow (#4471)
  feat(FRM): Revise post FRM core flows (#4394)
  feat(router): send poll_config in next_action of confirm response for external 3ds flow (#4443)
  chore(version): 2024.04.29.0
  feat(connector): [CRYPTOPAY]  Report underpaid/overpaid amount in outgoing webhooks (#4468)
  feat(users): use cookie for auth (#4434)
  refactor(scheduler): join frequency and count in `RetryMapping` (#4313)
  refactor(required_fields): change required fields for billing address (#4258)
  refactor(access_token): use `merchant_connector_id` for storing access token (#4462)
  chore(version): 2024.04.26.0
  chore(postman): update Postman collection files
pixincreate added a commit that referenced this pull request Apr 30, 2024
* 'main' of github.com:juspay/hyperswitch:
  refactor(cypress): read creds from env instead of hardcoding the path  (#4430)
  ci: fix paypal postman tests (#4501)
  Refactor(core): remove payment_method_id from RouterData struct (#4485)
  fix(euclid_wasm): connector config wasm metadata update (#4460)
  chore(version): 2024.04.30.0
  feat(user): add single purpose token and auth (#4470)
  feat: stripe connect integration for payouts (#2041)
  feat(router): handle authorization for frictionless flow in external 3ds flow (#4471)
  feat(FRM): Revise post FRM core flows (#4394)
  feat(router): send poll_config in next_action of confirm response for external 3ds flow (#4443)
  chore(version): 2024.04.29.0
  feat(connector): [CRYPTOPAY]  Report underpaid/overpaid amount in outgoing webhooks (#4468)
  feat(users): use cookie for auth (#4434)
  refactor(scheduler): join frequency and count in `RetryMapping` (#4313)
  refactor(required_fields): change required fields for billing address (#4258)
  refactor(access_token): use `merchant_connector_id` for storing access token (#4462)
  chore(version): 2024.04.26.0
  chore(postman): update Postman collection files
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include single purpose token and single purpose JWT auth
5 participants