@minimaltech/node-infra 0.5.9-27 → 0.5.9-29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,7 +104,6 @@ let AuthenticateComponent = AuthenticateComponent_1 = class AuthenticateComponen
104
104
  const oauth2Controller = (0, controllers_1.defineOAuth2Controller)(oauth2Options.restOptions);
105
105
  this.application.controller(oauth2Controller);
106
106
  this.application.mountExpressRouter((_b = (_a = oauth2Options.restOptions) === null || _a === void 0 ? void 0 : _a.restPath) !== null && _b !== void 0 ? _b : '/oauth2', controllers_1.DefaultOAuth2ExpressServer.getInstance({
107
- context: this.application,
108
107
  viewFolder,
109
108
  authServiceKey: handler.authServiceKey,
110
109
  injectionGetter: this.application.getInjectionGetter(),
@@ -94,7 +94,7 @@ class DefaultOAuth2ExpressServer extends controllers_1.AbstractExpressRequestHan
94
94
  });
95
95
  return;
96
96
  }
97
- const oauth2Service = this.getSync('services.OAuth2Service');
97
+ const oauth2Service = this.injectionGetter('services.OAuth2Service');
98
98
  const decryptedClient = oauth2Service.decryptClientToken({ token });
99
99
  oauth2Service
100
100
  .doOAuth2({
@@ -184,8 +184,8 @@ class AbstractOAuth2AuthenticationHandler {
184
184
  }
185
185
  const oauth2ClientRepository = this.injectionGetter('repositories.OAuth2ClientRepository');
186
186
  const oauth2Client = yield oauth2ClientRepository.findOne({
187
- where: { identifier: clientId },
188
- fields: ['id', 'identifier', 'name', 'description', 'userId'],
187
+ where: { clientId },
188
+ fields: ['id', 'identifier', 'clientId', 'name', 'description', 'userId'],
189
189
  });
190
190
  if (!oauth2Client) {
191
191
  throw (0, utilities_1.getError)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minimaltech/node-infra",
3
- "version": "0.5.9-27",
3
+ "version": "0.5.9-29",
4
4
  "description": "Minimal Technology - NodeJS Infrastructure - Loopback 4 Framework",
5
5
  "keywords": [
6
6
  "web",