The best practise of writing the authentication


#1

I am trying to figure out how to implement authentication using ember.js. I’m currently using python’s pyramid framework as the backend, I’m not sure if I can do the things in ember.js,

  1. Setup the global access control data, for example {“view”: [“user1”,“user2”], “edit”:[“user3”]}
  2. set a “permission=view/edit” property for any of the url
  3. create a “forbidden template (login)” which ember.js could automatically redirect to it when a request goes into the protected url and failed the authentication/authorization check.

Is there any example code for doing the above process? Or anybody has better solution in ember.js.

Thanks


#2

https://github.com/heartsentwined/ember-auth covers all of that. It’s worth checking out to get some ideas from if nothing else.


#3

I guess the ember-auth answered all my questions. Thanks for point out the resource!