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

0.25.1 • 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

664

Version

0.25.1

License

Apache-2.0

Unpacked Size

401 kB

Total Files

154

Last publish

Collaborators

  • onereach.user
  • onereach.admin