@or-sdk/authorizer
TypeScript icon, indicating that this package has built-in type declarations

0.25.5 • Public • Published

Installation:

$ npm i @or-sdk/authorizer

Usage:

// Basic package (Username-password)
import { BasicCollection } from '@or-sdk/authorizer/Basic'

const basicCollectionInstance = new BasicCollection({
  token: 'my-account-token-string',
  discoveryUrl: 'discovery.example.onereach.ai',
  serviceName: '__authorization_service_test_service',
  accountId: 'my-account-ID' // Optional, for Super-Admins only
});


// Token package
import { TokenCollection } from '@or-sdk/authorizer/Token'

const tokenCollectionInstance = new TokenCollection({
  token: 'my-account-token-string',
  discoveryUrl: 'discovery.example.onereach.ai',
  serviceName: '__authorization_service_test_service',
  accountId: 'my-account-ID' // Optional, for Super-Admins only
});


// OAuth package
import { OAuthCollection } from '@or-sdk/authorizer/OAuth'

const oAuthCollectionInstance = new OAuthCollection({
  token: 'my-account-token-string',
  discoveryUrl: 'discovery.example.onereach.ai',
  serviceName: '__authorization_service_test_service',
  keyValueCollection: 'custom-collection-name', // Pass this if you using custom name for key-value collection that differs from serviceName
  accountId: 'my-account-ID' // Optional, for Super-Admins only
});

Readme

Keywords

none

Package Sidebar

Install

npm i @or-sdk/authorizer

Weekly Downloads

635

Version

0.25.5

License

Apache-2.0

Unpacked Size

402 kB

Total Files

154

Last publish

Collaborators

  • onereach.admin
  • onereach.user