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

jwt, authentication, multi datasource connect

Usage no npm install needed!

<script type="module">
  import vasIlotuslandLoopbackExtensionMultiTenancyVas from 'https://cdn.skypack.dev/@vas-ilotusland/loopback.extension.multi-tenancy-vas';
</script>

README

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