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

Custom JWT error message #22

Closed
nmarulo opened this issue Oct 2, 2024 · 20 comments · Fixed by #42
Closed

Custom JWT error message #22

nmarulo opened this issue Oct 2, 2024 · 20 comments · Fixed by #42
Assignees
Labels
Difficulty: Complex hacktoberfest Participando en el Hacktoberfest

Comments

@nmarulo
Copy link
Member

nmarulo commented Oct 2, 2024

Important

Read issue #2 first

I want that when the token fails, it returns a customizable error message, similar to the ControllerExceptionHandler class where I return an ErrorRes object.

Maybe this documentation gives a clue as to what needs to be done: https://docs.spring.io/spring-security/reference/servlet/oauth2/resource-server/bearer-tokens.html

To make the token fail for time, just modify the app.jwt.expires-at property of the application.properties file.

This issue is open to changes or suggestions.

@nmarulo nmarulo added hacktoberfest Participando en el Hacktoberfest Difficulty: Complex labels Oct 2, 2024
@nmarulo nmarulo added this to the hacktoberfest 2024 milestone Oct 2, 2024
@ArinNigam
Copy link

I would like to work on this issue

@Madhan-ms-21
Copy link

Hi @nmarulo

I would like to contribute for the same, this is my first contribution , i hope with proper instruction i can help you resolve this

@nmarulo
Copy link
Member Author

nmarulo commented Oct 6, 2024

@Madhan-ms-21 It's all yours 👍

@Madhan-ms-21
Copy link

@nmarulo

Here are few Clarifications needed from your side

  1. Token Fails
    In what cases you want to return a customizable message ,
    I can think of One at Invalid tokena case and other at Expired Token case .

    Let me Know anything else you are looking for?

@nmarulo
Copy link
Member Author

nmarulo commented Oct 6, 2024

@Madhan-ms-21 That's right. Only those two cases.

@Madhan-ms-21
Copy link

@nmarulo
It seems we dont have Authorization constraint for api access as of now when i tested in postman .

All Endpoints which are accessible without bearer token , just to confirm ?

@nmarulo
Copy link
Member Author

nmarulo commented Oct 7, 2024

@Madhan-ms-21
Correct. Currently, everything can be accessed without authentication.

@Srijan25
Copy link

Srijan25 commented Oct 8, 2024

can you assign it to me i have exp in jwt

@nmarulo
Copy link
Member Author

nmarulo commented Oct 9, 2024

He still has a few days to complete the issue.

@Ankush-Paul-02
Copy link

Can you please assign me, I would like to fix this issue.

@despensa-app despensa-app deleted a comment from Ankush-Paul-02 Oct 12, 2024
@nmarulo
Copy link
Member Author

nmarulo commented Oct 12, 2024

As stated in issue #2

Each issue noted with hacktoberfest must be completed within a week and you can only do one per week, this is to give more participants a chance. ...

It's okay that you were not able to complete it, I appreciate your effort and interest.

@Ankush-Paul-02
Copy link

@nmarulo can you please assign me this

@nmarulo
Copy link
Member Author

nmarulo commented Oct 12, 2024

@Srijan25 Do you still want to do this issue?

@nmarulo
Copy link
Member Author

nmarulo commented Oct 13, 2024

@Ankush-Paul-02 Do you still want to do this issue?

@Ankush-Paul-02
Copy link

Yes I want to do this

@nmarulo
Copy link
Member Author

nmarulo commented Oct 13, 2024

@Ankush-Paul-02 It's all yours 👍

@nmarulo
Copy link
Member Author

nmarulo commented Oct 20, 2024

As stated in issue #2

Each issue noted with hacktoberfest must be completed within a week and you can only do one per week, this is to give more participants a chance. ...

It's okay that you were not able to complete it, I appreciate your effort and interest.

@JinnJarBurger
Copy link
Contributor

@nmarulo could you assign me this issue? Thanks!

@nmarulo
Copy link
Member Author

nmarulo commented Oct 21, 2024

@JinnJarBurger It's all yours 👍

@JinnJarBurger
Copy link
Contributor

@JinnJarBurger It's all yours 👍

alright on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Complex hacktoberfest Participando en el Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants