toymachiner62 / hapi-authorization

ACL plugin for hapijs
MIT License
80 stars 25 forks source link

Just curious about how scalable this approach is? #14

Closed sfabriece closed 8 years ago

sfabriece commented 8 years ago

I'm working on a project and looking for authorization modules.

I want my servers to be near stateless. Do you think is is achievable with this module and if not any suggestions?

toymachiner62 commented 8 years ago

Yes it is achievable. The way i was using it in one of my apps is I was authenticating a when they logged in and created a token and stored it in mongo along with other user details and then send that token back to the client after successful authentication. The client would then pass that token as a header on all requests to the server and before the server would do anything with the request it would check the token against mongo to ensure it was valid and hadn't expired.

sfabriece commented 8 years ago

Thanks for the answer.