Giter VIP home page Giter VIP logo

tenant-js-lib's Introduction

,# Ambisafe SaaS Tenant Library

This library allows to issue one-time, consumable bearer tokens that represent permissions to the Ambisafe SaaS services. Each Tentant (Business Customer of Ambisafe) can use this library, together with an active subscription and the derived API keys to delegate access to its users.

NOTICE: Abuse or loss of API keys can create undesired high cost on the SaaS bill of the tenant. Security of API keys is responsibility of the tenant. Only use this library on the backend, don't expose API keys to 3rd parties or in web or mobile applications.

Usage

Debug and validate tokens on jwt.io.

Setup

var Ambi = require('ambiTenant');
var ambi = new Ambi('api key id', 'api key secret');

Faucet

var token = ambi.issueFaucetToken();

Storage

var token = ambi.issueStorageToken();
//example token: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIxMjMiLCJzdWIiOiJzdG9yYWdlIiwianRpIjoiNjU3NzhiNzQtZGE0Mi00ZGQ2LTlmNjgtYmUxZWJmNGU3MDUwIiwiYXVkIjoiYW1iaXNhZmUiLCJleHAiOjE0NjE5NDAwOTgsImlhdCI6MTQ2MTkzNjQ5OH0.sObUi2W7sZ85R6aVW0pPUlyYid88aqFoqAX9fUIV1Cw`

Recovery

var token = ambi.issueRecoveryToken();

Co-Signing

//execute 2fa
var sender = //read from db;
var msgData = '0x123';
var token = ambi.issueCosignToken(msgData, sender);

tenant-js-lib's People

Contributors

johannbarbie avatar lastperson avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.