ngx-sp-auth 4.20.3 → 4.20.7
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.
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
4
3
|
import { CheckUrlAndMethodService } from 'ngx-sp-infra';
|
|
5
4
|
import { LibCustomEnvironmentService } from '../custom/lib-custom-environment.service';
|
|
5
|
+
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* com o login para uso da API.
|
|
10
|
-
*
|
|
8
|
+
* Intercepta uma chamada HTTP para inserir o usuário logado nos cookies (e header, para compatibilidade) em conjunto com o login para uso da API.
|
|
11
9
|
* Depende do serviço de autenticação.
|
|
12
|
-
|
|
10
|
+
*/
|
|
13
11
|
export declare class AuthAplicInterceptor implements HttpInterceptor {
|
|
14
|
-
private
|
|
15
|
-
private
|
|
12
|
+
private _authCheckService;
|
|
13
|
+
private _authStorage;
|
|
16
14
|
private _customEnvironmentService;
|
|
17
|
-
constructor(
|
|
15
|
+
constructor(_authCheckService: CheckUrlAndMethodService, _authStorage: AuthStorageService, _customEnvironmentService: LibCustomEnvironmentService);
|
|
18
16
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
19
17
|
handle(req: HttpRequest<any>, next: HttpHandler): Promise<HttpEvent<any>>;
|
|
20
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthAplicInterceptor, never>;
|
|
@@ -3,13 +3,11 @@ import { Observable } from "rxjs";
|
|
|
3
3
|
import { CheckUrlAndMethodService } from "ngx-sp-infra";
|
|
4
4
|
import { LibCustomEnvironmentService } from '../custom/lib-custom-environment.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* \brief Intercepta uma chamada HTTP para inserir a autenticação da Sispro.
|
|
8
|
-
*/
|
|
6
|
+
/** Intercepta uma chamada HTTP para inserir a autenticação da básica das APIs nos Cookies (e no header, para compatibilidade) */
|
|
9
7
|
export declare class AuthInfraInterceptor implements HttpInterceptor {
|
|
10
|
-
private
|
|
8
|
+
private _authCheckService;
|
|
11
9
|
private _customEnvironmentService;
|
|
12
|
-
constructor(
|
|
10
|
+
constructor(_authCheckService: CheckUrlAndMethodService, _customEnvironmentService: LibCustomEnvironmentService);
|
|
13
11
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
14
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthInfraInterceptor, never>;
|
|
15
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthInfraInterceptor>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { ApplicationRef,
|
|
2
|
+
import { ApplicationRef, Injector } from '@angular/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { LibCustomEnvironmentService } from '../custom/lib-custom-environment.service';
|
|
5
5
|
import { RetTelasPesquisa } from '../models/ret-telas-pesquisa.model';
|
|
@@ -27,12 +27,12 @@ import * as i0 from "@angular/core";
|
|
|
27
27
|
* }
|
|
28
28
|
*/
|
|
29
29
|
export declare class PesquisaTelasGlobalService {
|
|
30
|
-
private _componentFactoryResolver;
|
|
31
30
|
private _appRef;
|
|
32
31
|
private _injector;
|
|
33
32
|
private _httpClient;
|
|
34
33
|
private _customEnvironmentService;
|
|
35
34
|
private _authUtils;
|
|
35
|
+
private _container;
|
|
36
36
|
/**
|
|
37
37
|
* Referência ao componente dinâmico criado.
|
|
38
38
|
* Usado para gerenciar o ciclo de vida e estado do componente.
|
|
@@ -68,7 +68,7 @@ export declare class PesquisaTelasGlobalService {
|
|
|
68
68
|
private _componentSearchSub;
|
|
69
69
|
private readonly _BASE_URL;
|
|
70
70
|
private readonly _HTTP_HEADERS;
|
|
71
|
-
constructor(
|
|
71
|
+
constructor(_appRef: ApplicationRef, _injector: Injector, _httpClient: HttpClient, _customEnvironmentService: LibCustomEnvironmentService, _authUtils: AuthUtilService);
|
|
72
72
|
/**
|
|
73
73
|
* Lifecycle hook do Angular chamado quando o serviço é destruído.
|
|
74
74
|
*
|
|
@@ -94,7 +94,7 @@ export declare class PesquisaTelasGlobalService {
|
|
|
94
94
|
*
|
|
95
95
|
* Este método utiliza a API baixo nível do Angular para criar um componente dinamicamente e anexá-lo ao DOM. O processo envolve:
|
|
96
96
|
*
|
|
97
|
-
* 1. Criar o componente via
|
|
97
|
+
* 1. Criar o componente via `container.createComponent()`
|
|
98
98
|
* 2. Configurar suas propriedades iniciais
|
|
99
99
|
* 3. Registrá-lo no mecanismo de detecção de mudanças do Angular
|
|
100
100
|
* 4. Anexá-lo ao DOM (fora da hierarquia normal de componentes)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-sp-auth",
|
|
3
|
-
"version": "4.20.
|
|
3
|
+
"version": "4.20.7",
|
|
4
4
|
"description": "Biblioteca de utilitários de autenticação.",
|
|
5
5
|
"author": "P&D",
|
|
6
6
|
"keywords": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@azure/msal-angular": "^4.0.16",
|
|
24
24
|
"@azure/msal-browser": "^4.18.0",
|
|
25
25
|
"idb": "^8.0.3",
|
|
26
|
-
"ngx-sp-infra": "^6.20.
|
|
26
|
+
"ngx-sp-infra": "^6.20.12",
|
|
27
27
|
"ngx-toastr": "^19.0.0"
|
|
28
28
|
},
|
|
29
29
|
"sideEffects": false,
|