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