nickredmark / ooth

User identity/authentication/accounts management microservice for node.js
https://nmaro.github.io/ooth/
MIT License
605 stars 65 forks source link

Additional fields #60

Closed jmarceli closed 6 years ago

jmarceli commented 6 years ago

Hi, is it possible to provide additional fields inside API response?

Currently using ooth-local login or getStatus I get response similar to this:

{"user":{"_id":"5af48ba5b91e401fb62800c6","local":{"email":"test@test.com"}}}

Is it possible to add for example permissions key to get response similar to this:

{"user":{"_id":"5af48ba5b91e401fb62800c6","local":{"email":"test@test.com","permissions":"admin"}}}
nickredmark commented 6 years ago

For this specific use case use the ooth-roles plugin. https://github.com/nmaro/ooth/wiki/Plugins#managing-user-roles

jmarceli commented 6 years ago

Thanks, it looks like something that I was looking for.