emilsoftware-utilities 1.3.65 → 1.3.67
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.
|
@@ -5,9 +5,8 @@ import { IPermissionService } from "../PermissionService/IPermissionService";
|
|
|
5
5
|
export declare class AuthService implements IAuthService {
|
|
6
6
|
private userService;
|
|
7
7
|
private permissionService;
|
|
8
|
-
private authService;
|
|
9
8
|
private accessiOptions;
|
|
10
|
-
constructor(userService: IUserService, permissionService: IPermissionService,
|
|
9
|
+
constructor(userService: IUserService, permissionService: IPermissionService, accessiOptions: AccessiOptions);
|
|
11
10
|
getOptions(): AccessiOptions;
|
|
12
11
|
login(request: LoginRequest): Promise<ILoginResult>;
|
|
13
12
|
setPassword(codiceUtente: string, nuovaPassword: string): Promise<any>;
|
|
@@ -27,10 +27,9 @@ const Orm_1 = require("../../../Orm");
|
|
|
27
27
|
const Utilities_1 = require("../../../Utilities");
|
|
28
28
|
const StatoRegistrazione_1 = require("../../models/StatoRegistrazione");
|
|
29
29
|
let AuthService = class AuthService {
|
|
30
|
-
constructor(userService, permissionService,
|
|
30
|
+
constructor(userService, permissionService, accessiOptions) {
|
|
31
31
|
this.userService = userService;
|
|
32
32
|
this.permissionService = permissionService;
|
|
33
|
-
this.authService = authService;
|
|
34
33
|
this.accessiOptions = accessiOptions;
|
|
35
34
|
}
|
|
36
35
|
getOptions() {
|
|
@@ -61,7 +60,7 @@ let AuthService = class AuthService {
|
|
|
61
60
|
throw new Error(`Errore generico. Stato di registrazione non valido: ${utente.statoRegistrazione}.`);
|
|
62
61
|
}
|
|
63
62
|
// Verifica la password
|
|
64
|
-
const isPasswordValid = yield this.
|
|
63
|
+
const isPasswordValid = yield this.verifyPassword(utente.codiceUtente, passwordCifrata);
|
|
65
64
|
if (!isPasswordValid)
|
|
66
65
|
throw new Error("Nome utente o password errata!");
|
|
67
66
|
// Recupera le abilitazioni
|
|
@@ -136,7 +135,6 @@ exports.AuthService = AuthService = __decorate([
|
|
|
136
135
|
(0, inversify_1.injectable)(),
|
|
137
136
|
__param(0, (0, inversify_1.inject)("IUserService")),
|
|
138
137
|
__param(1, (0, inversify_1.inject)("IPermissionService")),
|
|
139
|
-
__param(2, (0, inversify_1.inject)("
|
|
140
|
-
|
|
141
|
-
__metadata("design:paramtypes", [Object, Object, Object, Object])
|
|
138
|
+
__param(2, (0, inversify_1.inject)("AccessiOptions")),
|
|
139
|
+
__metadata("design:paramtypes", [Object, Object, Object])
|
|
142
140
|
], AuthService);
|