mashupbots / socko

A Scala web server powered by Netty networking and AKKA processing.
Other
255 stars 51 forks source link

Open API support? #103

Open chenweiyj opened 9 years ago

chenweiyj commented 9 years ago

Is it possible to integrate open api to socko web server? I am going to open our system's api, but I could not find a nice framework to do so. Have I to realize all the oauth methods?

simbo1905 commented 8 years ago

There is a demo of OpenID with socko over at https://github.com/simbo1905/socko-openid with full write up at https://simbo1905.wordpress.com/2014/05/05/openid-authentication-with-socko-webserver/

The code is fairly non trivial and I have not given it any thought as to how it could be abstracted away to something which is simply plugged into an app. If someone can see how to make it some sort of configurable filter that would be decorated onto other routes without being so directly visible then I would love to see that.

My thoughts are that the beauty of socko is the bare bones brevity with just a thin transformation between http and actors. I don't feel that it should do a lot more than correctly managing resources and giving a low level API; but having some sort of filter mechanism where folks can add extensions to it like openid or the stateful session class would be nice.