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

Change function signature of middleware jwt's SuccessHandler #2644

Open
luckycatx opened this issue Jun 9, 2024 · 2 comments
Open

Change function signature of middleware jwt's SuccessHandler #2644

luckycatx opened this issue Jun 9, 2024 · 2 comments

Comments

@luckycatx
Copy link

Should change middleware jwt's SuccessHandler:

type JWTSuccessHandler func(c echo.Context)
-> type JWTSuccessHandler func(c echo.Context) error

It should be a minor change that will not affect most uses and API.

@aldas
Copy link
Contributor

aldas commented Jun 9, 2024

We have marked JWT middleware as deprecated in Echo core library and avoid changing it unless there are security or other very serious issues. Successor for JWT middleware is https://github.com/labstack/echo-jwt

it has same signature as mentioned here https://github.com/labstack/echo-jwt/blob/60df66b4c5f07aec26b2a0f3d88bff9e59bbec82/jwt.go#L25 so it would be better if issue is raised there. As we have opted to have more "relaxed" versioning there and that change is more like to be implemented there than in core.

@luckycatx
Copy link
Author

We have marked JWT middleware as deprecated in Echo core library and avoid changing it unless there are security or other very serious issues. Successor for JWT middleware is https://github.com/labstack/echo-jwt

it has same signature as mentioned here https://github.com/labstack/echo-jwt/blob/60df66b4c5f07aec26b2a0f3d88bff9e59bbec82/jwt.go#L25 so it would be better if issue is raised there. As we have opted to have more "relaxed" versioning there and that change is more like to be implemented there than in core.

I'm referring to this one, I'll open this issue there.
btw is there any particular reason why the echo-jwt middleware is not put in echo-contrib repo but in a separate repo? Putting it in contrib should provide better consistency. Also, are there any plans to remove the jwt middleware in the core library?

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

No branches or pull requests

2 participants