Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spray security: how to protect routes?

I'm trying to implement a full development with REST Spray. There is an argument that I have not yet figured out and I have not found documented: how to protect the routes for authentication / authorization? I would just use a token - based authentication through a header of the request.

like image 880
Marco Avatar asked Sep 28 '14 09:09

Marco


1 Answers

At the moment Spray implements only basic security mechanisms. It comes with HTTP basic authentication implemented and some cookie support.

It makes sense not to include more specific security implementations because every project implements it differently. Although Oauth implementation would be useful in many cases. There might be projects that provide that for Spray.

Token based authentication sounds like a good general choice.

like image 188
yǝsʞǝla Avatar answered Sep 18 '22 00:09

yǝsʞǝla