On Thu, Feb 12, 2015 at 4:07 PM, Egon Nijns <egon....@gmail.com> wrote:That's a great tutorial! Thanks!
Since you're asking: I'd like to find out how to deal with authentication and authorization when using autowire. The authentication part seems simple, but what if I'd like certain methods of my API to only be accessible to certain kind of users? Just split up the API for each role (e.g. a public API and an API for administrators)?
There's no one-size fits all answer (for instance, authorization is much more complex in my app), but that seems like a good approach. If you do it this way, you can do your authorization checks before invoking the Autowire router, and the individual Autowire entry points don't need to worry about it...
Good idea. Thanks for sharing Justin.
I really hope to find some time soon to pick up all this stuff again...
That's a great tutorial! Thanks!
Since you're asking: I'd like to find out how to deal with authentication and authorization when using autowire. The authentication part seems simple, but what if I'd like certain methods of my API to only be accessible to certain kind of users? Just split up the API for each role (e.g. a public API and an API for administrators)?
Why not just the traditional session cookie -based authorization? Server assigns a cookie when you authenticate and each request comes with that cookie which the server can again authorize. Then the question is only about how Autowire can incorporate session/user/authorization information in the "Api" call.
Perhaps Haoyi can share some thoughts on how to incorporate "session" data in Autowire?
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-js/64eaa5b6-e0ea-40cb-8e29-59f05f572692%40googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "Scala.js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-js/41nCyvZj7Oo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-js+u...@googlegroups.com.
sbt.version=0.13.5
regards,
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-js/020d70c3-c7a1-43ce-bbcc-465befc46928%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Scala.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-js+u...@googlegroups.com.