1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.AuthenticationBaseStrategy = void 0;
|
4 | class 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 | }
|
25 | exports.AuthenticationBaseStrategy = AuthenticationBaseStrategy;
|
26 |
|
\ | No newline at end of file |