UNPKG

722 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.AuthenticationBaseStrategy = void 0;
4class AuthenticationBaseStrategy {
5 setAuthentication(auth) {
6 this.authentication = auth;
7 }
8 setApplication(app) {
9 this.app = app;
10 }
11 setName(name) {
12 this.name = name;
13 }
14 get configuration() {
15 return this.authentication.configuration[this.name];
16 }
17 get entityService() {
18 const { service } = this.configuration;
19 if (!service) {
20 return null;
21 }
22 return this.app.service(service) || null;
23 }
24}
25exports.AuthenticationBaseStrategy = AuthenticationBaseStrategy;
26//# sourceMappingURL=strategy.js.map
\No newline at end of file