authorizer-2-handler

    0.0.5 • Public • Published

    Package for using with Authorizer 2

    Usage:

    const Storage = require('or-sdk/storage');
    const storage = new Storage(this);
    const Request = require('or-sdk/request');
    const request = new Request(this);
    const cache = require('or-sdk/src/services/cache');
    
    const Authorization = require('authorizer-2-handler');
    
    const modules = {
      storage,
      request,
      cache
    };
    
    const authHandler = new Authorization(auth, authDynamicCollection,
    authDynamicAuthId, authData, modules, this);
    
    let access;
    try {
      access = await authHandler.getAccessData();
    } catch (e) {
      this.log.error(e.message, e);
      if (e.isNoAuthLeg) {
        return this.exitStep('no auth', {
          error: e.message
        })
      } else {
        throw new Error(e.message);
      }
    }
    

    Keywords

    none

    Install

    npm i authorizer-2-handler

    DownloadsWeekly Downloads

    83

    Version

    0.0.5

    License

    ISC

    Unpacked Size

    6.79 kB

    Total Files

    3

    Last publish

    Collaborators

    • ihorb