// 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
});