oute-services-authorization-sdk

0.0.16 • Public • Published

This module expose helper functions

  • Initialization
  params = {
    url: @server url
    token: @access token
  }
  Authorization = require("oute-services-authorization-sdk")
  authorization_instance = new Authorization(params)

Cache functions

Core functions

  • Save
  body = {
    "_id": "FRldyxUB1",
    "name": "slack",
    "auth_type": "JWT",
    "parent_id": "q-GmTD5-K",
    "workspace_id": "ZzBfJMpfQ",
    "configs": [],
    "state": "ACTIVE",
    "environment_id": null //send the environment id for environment specific value and used to get from variables
  }
  await authorization_instance.save(body)
  • delete by id
  authorization_id = "FRldyxUB1"
  await authorization_instance.deleteById(authorization_id)
  • get by parent id
  query = {
    parent_id: "q-GmTD5-K"
  }
  await authorization_instance.getByParent(query)
  • map to assets
  body = {
    "authorization_ids": ["FRldyxUB1"],
    "workspace_id": "ZzBfJMpfQ",
    "asset_id" : "q-GmTD5-K"
  }
  await authorization_instance.mapToAsset(body)

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i oute-services-authorization-sdk

    Weekly Downloads

    7

    Version

    0.0.16

    License

    none

    Unpacked Size

    10.1 kB

    Total Files

    13

    Last publish

    Collaborators

    • oute