0.0.12 • Published 3 years ago

@vas-ilotusland/loopback.extension.multi-tenancy v0.0.12

Weekly downloads
3
License
-
Repository
-
Last release
3 years ago

multi-tenant-jwt

LoopBack

training

Installation

Install MultiTenantJwtComponent using npm;

$ npm install multi-tenant-jwt

Basic Use

Configure and load MultiTenantJwtComponent in the application constructor as shown below.

import {MultiTenantJwtComponent, MultiTenantJwtComponentOptions, DEFAULT_MULTI_TENANT_JWT_OPTIONS} from 'multi-tenant-jwt';
// ...
export class MyApplication extends BootMixin(ServiceMixin(RepositoryMixin(RestApplication))) {
  constructor(options: ApplicationConfig = {}) {
    const opts: MultiTenantJwtComponentOptions = DEFAULT_MULTI_TENANT_JWT_OPTIONS;
    this.configure(MultiTenantJwtComponentBindings.COMPONENT).to(opts);
      // Put the configuration options here
    });
    this.component(MultiTenantJwtComponent);
    // ...
  }
  // ...
}