appleboy / gin-jwt

JWT Middleware for Gin framework
MIT License
2.76k stars 388 forks source link

Allow guest access to "protected" routes #79

Open nd2s opened 7 years ago

nd2s commented 7 years ago

I'm trying to just get session information into my handlers. For that I want a route to be accessible by authorised users as well as guests. Can gin_jwt library handle this situation? I'm not sure how to avoid the auth header empty error.

nd2s commented 6 years ago

Can you give a hint how this could be implemented?

davidchalifoux commented 6 years ago

I'm also looking for more info on how to do this!

nd2s commented 6 years ago

I ended up writing my own solution based on this library. Also threw out a lot of functionality I don't need.

I'm afraid this lib wasn't built to handle this use case and can't be easily extended as far as I can remember.