ngx-sp-auth 4.20.4 → 4.20.8

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.
@@ -23,9 +23,10 @@ export declare class AuthService {
23
23
  private _customEnvironmentService;
24
24
  private _indexedDBService;
25
25
  private _pendingWarning;
26
- private readonly _BASE_URL;
27
26
  private readonly _AUTH_BASE_URL;
27
+ private readonly _BASE_URL;
28
28
  private readonly _BASE_OS_URL;
29
+ private readonly _LOGOUT_BASE_URL;
29
30
  private readonly _HTTP_HEADERS;
30
31
  private ip;
31
32
  private city;
@@ -59,7 +60,7 @@ export declare class AuthService {
59
60
  * @returns Observable com os dados do login realizado, seja erro ou sucesso
60
61
  */
61
62
  loginOS(parmsLogin: LoginForm, serialV6: string): Observable<RetLogin>;
62
- /** Realiza o logout do sistema, removendo tokens do localStorage e limpando cache */
63
+ /** Realiza o logout do sistema, consumindo o endpoint de logout para remover os cookies e limpando as informações de autenticação armazenadas no localStorage. */
63
64
  logout(): void;
64
65
  validateAuthentication2Fa(code: string): Observable<RetLogin>;
65
66
  GetNewCode2Fa(): Observable<RetError>;
@@ -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
- * \brief Intercepta uma chamada HTTP para inserir o usuário logado no header em conjunto
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 authCheckService;
15
- private token;
12
+ private _authCheckService;
13
+ private _authStorage;
16
14
  private _customEnvironmentService;
17
- constructor(authCheckService: CheckUrlAndMethodService, token: AuthStorageService, _customEnvironmentService: LibCustomEnvironmentService);
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 authCheckService;
8
+ private _authCheckService;
11
9
  private _customEnvironmentService;
12
- constructor(authCheckService: CheckUrlAndMethodService, _customEnvironmentService: LibCustomEnvironmentService);
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, ComponentFactoryResolver, Injector } from '@angular/core';
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(_componentFactoryResolver: ComponentFactoryResolver, _appRef: ApplicationRef, _injector: Injector, _httpClient: HttpClient, _customEnvironmentService: LibCustomEnvironmentService, _authUtils: AuthUtilService);
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 ComponentFactoryResolver
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.4",
3
+ "version": "4.20.8",
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.11",
26
+ "ngx-sp-infra": "^6.20.12",
27
27
  "ngx-toastr": "^19.0.0"
28
28
  },
29
29
  "sideEffects": false,