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: Add the possibility to specify jwt content #2

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

Demacri
Copy link

@Demacri Demacri commented Oct 14, 2024

Overview
This pull request includes an improvement to the AdonisJS JWT authentication package.

Configuration Enhancements:

Added a new content option to the jwtGuard configuration in src/define_config.ts to allow custom JWT content.

JWT Guard Enhancements:

Introduced a content function in JwtGuardOptions to customize the JWT payload.
Updated JwtGuard to utilize the content function during token generation.

Added tests:

Added a new test case in tests/guard.spec.ts to verify the custom JWT content functionality.

This pull request aims to enhance the flexibility and functionality of the AdonisJS JWT package, providing more options for customization and better alignment with user needs.

@MaximeMRF
Copy link
Owner

Hi @Demacri,

seems nice, I will check it soon

@MaximeMRF
Copy link
Owner

Please don't update the it should return a token when user is authenticated test and create another one for your feature

@Demacri Demacri force-pushed the feat/jwt-content-improvements branch from 63382c6 to d3bcc88 Compare October 15, 2024 16:31
@Demacri
Copy link
Author

Demacri commented Oct 15, 2024

Please don't update the it should return a token when user is authenticated test and create another one for your feature

so sorry, i deleted it accidentally. Squashed and pushed new commit

@MaximeMRF MaximeMRF merged commit 618d969 into MaximeMRF:main Oct 15, 2024
8 checks passed
@MaximeMRF
Copy link
Owner

thanks for your contribution ❤️

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