JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q34768F
  • License WTFPL

a client to connect to open-age services

Package Exports

  • @open-age/client
  • @open-age/client/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@open-age/client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

directory-client

Client to interact with the user

config

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>"
        }
    }
}

usage

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)