@open-age/directory-client
v2.2.4
Published
a client to connect to open-age directory
Downloads
61
Maintainers
Readme
directory-client
Client to interact with the user
config
add following section to the config/{env}.config
file
"providers": {
"directory": {
// "url": "http://ems-api-dev.m-sas.com", // test url
"url": "http://directory-api.mindfulsas.com", // prod url
"tenantKey": null,
"tenantCode": "aqua"
}
}
usage
Get a role by key
const directory = require('@open-age/directory-client')
const roleKey = 'xxx....xxx' // role key of the user
// impersonates the user
const role = await directory.roles.get(roleKey)