Closed koresar closed 8 years ago
Hi @koresar, thanks for this PR! Planning on getting to this tonight FYI - but it looks good. Thanks for linking to the relevant API docs.
Curious about this, what type of stuff do you use this for?
@johnbrett Thanks for spending time on this.
When a microservice S1 receives a HTTP call it calls a different "auth microservice" S2 to validate the received token. In addition to authentication the S2 also returns user data (aka user entity) to minimize the number of the DB calls. The S1 would need that user entity regardless.
In other words, we read user entity from DB once and then share it via the artifacts so that S1 don't need to reread the entity.
Thank you very much @johnbrett !
Looking forward to npm install
it.
Cheers :)
Merged - thanks for the PR @koresar! Microservices with hapi sounds really interesting! is it open source? if not would love a blog post or anything on it! :)
@johnbrett it's all private code unfortunately. We, the SafetyCulture, are going to create development blog and opensource various NPM modules this year.
That's really cool man, best of luck with that! By the way I practice OPEN open source on my projects where possible: http://openopensource.org/, would you like commit access to this repo? :)
LOL. Me too. :) https://github.com/koresar/fcql#want-to-contribute
Yeah. Commit access would be great. :)
Done - and makes it all the more awesome to give commit access to someone who also does open open source :)
This enables Hapi auth artifacts. Quoting hapijs.com:
And this: