Client to interact with the user
add following section to the config/{env}.config
file
"providers": {
"directory": {
"url": "http://api.openage.in/directory/v1/api", // prod url
"role": {
"key": "<presistant token>"
}
}
}
Get a role by key
const client = require('@open-age/client')
const roleKey = 'xxx....xxx' // role key of the user
// impersonates the user
const role = await client.directory.roles.get(roleKey)