ant0ine / go-json-rest

A quick and easy way to setup a RESTful JSON API
https://ant0ine.github.io/go-json-rest/
MIT License
3.52k stars 382 forks source link

Sessions #85

Open ryuken opened 10 years ago

ryuken commented 10 years ago

Are there any plans to implement sessions in the framework?

I tried to use gorilla's session, but it's not compatible because of rest.Request != http.Request and also with the ResponseWriter.

ant0ine commented 9 years ago

This is not provided by the framework yet. I'd like to have OAuth2 and other forms of authentication and sessions. For now you can use https://github.com/ant0ine/go-json-rest/blob/master/rest/auth_basic.go as an example of auth middleware. Feel free to share you code and contribute.

Thanks!