echo icon indicating copy to clipboard operation
echo copied to clipboard

Change function signature of middleware jwt's SuccessHandler

Open luckycatx opened this issue 1 year ago • 2 comments

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.

luckycatx avatar Jun 09 '24 17:06 luckycatx

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.

aldas avatar Jun 09 '24 17:06 aldas

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?

luckycatx avatar Jun 10 '24 09:06 luckycatx

closing, JWT middleware is removed from core. For alternatives see https://github.com/labstack/echo-jwt/discussions/29

aldas avatar Dec 08 '24 20:12 aldas