Spray safety: how to protect routes?

I am trying to implement full development using REST Spray. There is an argument that I have not yet understood, and I have not found documented: how to protect routes for authentication / authorization? I would just use token based authentication through the request header.

+6
source share
1 answer

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

It makes sense not to include more specific security implementations, because each project implements it differently. Although the Oauth implementation would be useful in many cases. There may be designs that provide this for Spray.

Token-based authentication sounds like a good general choice.

+2
source

Source: https://habr.com/ru/post/975958/


All Articles