ngx-sp-auth 3.0.3 → 3.0.5
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.
- package/fesm2022/ngx-sp-auth.mjs +230 -194
- package/fesm2022/ngx-sp-auth.mjs.map +1 -1
- package/lib/auth.service.d.ts +3 -3
- package/lib/components/login/login.component.d.ts +3 -3
- package/lib/components/menu-lateral/menu/menu-lateral.component.d.ts +3 -3
- package/lib/components/menu-lateral/menu-services.service.d.ts +3 -3
- package/lib/custom/lib-custom-environment.service.d.ts +19 -0
- package/lib/custom/lib-custom-login.service.d.ts +11 -14
- package/lib/custom/lib-custom-menu.service.d.ts +8 -13
- package/lib/custom/lib-custom-storage.service.d.ts +2 -6
- package/lib/custom/lib-menu-config.service.d.ts +2 -5
- package/lib/custom/models/icustom-environment-service.d.ts +13 -0
- package/lib/custom/models/icustom-login-service.d.ts +9 -9
- package/lib/custom/models/icustom-menu-service.d.ts +9 -6
- package/lib/custom/token.d.ts +11 -0
- package/lib/interceptors/auth-aplic.interceptor.d.ts +3 -3
- package/lib/interceptors/auth-infra.interceptor.d.ts +3 -3
- package/lib/project/project-utils.service.d.ts +3 -3
- package/lib/storage/auth-storage.service.d.ts +3 -3
- package/package.json +2 -2
- package/public-api.d.ts +7 -4
- package/lib/environments/environments.service.d.ts +0 -18
- package/lib/environments/models/ienvironments.d.ts +0 -13
package/lib/auth.service.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { IpServiceService, RetError } from 'ngx-sp-infra';
|
|
|
10
10
|
import { AuthStorageService } from './storage/auth-storage.service';
|
|
11
11
|
import { LibCustomLoginService } from './custom/lib-custom-login.service';
|
|
12
12
|
import { ProjectUtilservice } from './project/project-utils.service';
|
|
13
|
-
import {
|
|
13
|
+
import { LibCustomEnvironmentService } from './custom/lib-custom-environment.service';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
export declare class AuthService {
|
|
16
16
|
private _httpClient;
|
|
@@ -19,7 +19,7 @@ export declare class AuthService {
|
|
|
19
19
|
private _ipServiceService;
|
|
20
20
|
private _customLoginService;
|
|
21
21
|
private _projectUtilservice;
|
|
22
|
-
private
|
|
22
|
+
private _customEnvironmentService;
|
|
23
23
|
private _pendingWarning;
|
|
24
24
|
private readonly _BASE_URL;
|
|
25
25
|
private readonly _AUTH_BASE_URL;
|
|
@@ -29,7 +29,7 @@ export declare class AuthService {
|
|
|
29
29
|
private city;
|
|
30
30
|
private state;
|
|
31
31
|
private country;
|
|
32
|
-
constructor(_httpClient: HttpClient, _router: Router, _authStorageService: AuthStorageService, _ipServiceService: IpServiceService, _customLoginService: LibCustomLoginService, _projectUtilservice: ProjectUtilservice,
|
|
32
|
+
constructor(_httpClient: HttpClient, _router: Router, _authStorageService: AuthStorageService, _ipServiceService: IpServiceService, _customLoginService: LibCustomLoginService, _projectUtilservice: ProjectUtilservice, _customEnvironmentService: LibCustomEnvironmentService);
|
|
33
33
|
private getParms;
|
|
34
34
|
private getHostName;
|
|
35
35
|
/** Obtém o método de autenticação
|
|
@@ -7,7 +7,7 @@ import { ToastrService } from 'ngx-toastr';
|
|
|
7
7
|
import { FormUtils, MessageService } from 'ngx-sp-infra';
|
|
8
8
|
import { LibCustomLoginService } from '../../custom/lib-custom-login.service';
|
|
9
9
|
import { ProjectUtilservice } from '../../project/project-utils.service';
|
|
10
|
-
import {
|
|
10
|
+
import { LibCustomEnvironmentService } from '../../custom/lib-custom-environment.service';
|
|
11
11
|
import { AuthService } from '../../auth.service';
|
|
12
12
|
import { AuthStorageService } from '../../storage/auth-storage.service';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
@@ -28,13 +28,13 @@ export declare class LoginComponent implements OnInit {
|
|
|
28
28
|
private _formBuilder;
|
|
29
29
|
private _projectUtilservice;
|
|
30
30
|
private _authService;
|
|
31
|
-
private
|
|
31
|
+
private _customEnvironmentService;
|
|
32
32
|
private _authStorageService;
|
|
33
33
|
private _title;
|
|
34
34
|
private _router;
|
|
35
35
|
private _toastrService;
|
|
36
36
|
private _messageService;
|
|
37
|
-
constructor(_msalGuardConfiguration: MsalGuardConfiguration, _msalService: MsalService, _customLoginService: LibCustomLoginService, _formBuilder: FormBuilder, _projectUtilservice: ProjectUtilservice, _authService: AuthService,
|
|
37
|
+
constructor(_msalGuardConfiguration: MsalGuardConfiguration, _msalService: MsalService, _customLoginService: LibCustomLoginService, _formBuilder: FormBuilder, _projectUtilservice: ProjectUtilservice, _authService: AuthService, _customEnvironmentService: LibCustomEnvironmentService, _authStorageService: AuthStorageService, _title: Title, _router: Router, _toastrService: ToastrService, _messageService: MessageService);
|
|
38
38
|
private _situacaoLogin;
|
|
39
39
|
currentTime: Date;
|
|
40
40
|
year: number;
|
|
@@ -10,7 +10,7 @@ import { LibCustomMenuService } from '../../../custom/lib-custom-menu.service';
|
|
|
10
10
|
import { ProjectUtilservice } from '../../../project/project-utils.service';
|
|
11
11
|
import { MenuServicesService } from '../menu-services.service';
|
|
12
12
|
import { AuthService } from '../../../auth.service';
|
|
13
|
-
import {
|
|
13
|
+
import { LibCustomEnvironmentService } from '../../../custom/lib-custom-environment.service';
|
|
14
14
|
import { IMenuItemStructure } from '../model/imenu-item-structure.model';
|
|
15
15
|
import { ISubmenuItemStructure } from '../model/isubmenu-item-structure.model';
|
|
16
16
|
import { DynamicMenu } from '../model/dynamic-menu';
|
|
@@ -20,6 +20,7 @@ export declare class MenuLateralComponent implements OnInit, OnDestroy {
|
|
|
20
20
|
private _msalService;
|
|
21
21
|
private _toastrService;
|
|
22
22
|
_customMenuService: LibCustomMenuService;
|
|
23
|
+
private _customEnvironmentService;
|
|
23
24
|
private _authStorageService;
|
|
24
25
|
private _bsModalService;
|
|
25
26
|
private _menuServices;
|
|
@@ -27,8 +28,7 @@ export declare class MenuLateralComponent implements OnInit, OnDestroy {
|
|
|
27
28
|
private _projectUtilService;
|
|
28
29
|
private _router;
|
|
29
30
|
private _authService;
|
|
30
|
-
|
|
31
|
-
constructor(_msalGuardConfiguration: MsalGuardConfiguration, _msalService: MsalService, _toastrService: ToastrService, _customMenuService: LibCustomMenuService, _authStorageService: AuthStorageService, _bsModalService: BsModalService, _menuServices: MenuServicesService, _messageService: MessageService, _projectUtilService: ProjectUtilservice, _router: Router, _authService: AuthService, _environmentService: EnvironmentService);
|
|
31
|
+
constructor(_msalGuardConfiguration: MsalGuardConfiguration, _msalService: MsalService, _toastrService: ToastrService, _customMenuService: LibCustomMenuService, _customEnvironmentService: LibCustomEnvironmentService, _authStorageService: AuthStorageService, _bsModalService: BsModalService, _menuServices: MenuServicesService, _messageService: MessageService, _projectUtilService: ProjectUtilservice, _router: Router, _authService: AuthService);
|
|
32
32
|
ngOnInit(): Promise<void>;
|
|
33
33
|
ngOnDestroy(): void;
|
|
34
34
|
sidebar: ElementRef<HTMLDivElement>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { AuthStorageService } from '../../storage/auth-storage.service';
|
|
4
|
-
import {
|
|
4
|
+
import { LibCustomEnvironmentService } from '../../custom/lib-custom-environment.service';
|
|
5
5
|
import { RetError, RetEstabelecimentosModal } from 'ngx-sp-infra';
|
|
6
6
|
import { Usuario_IMG } from './model/usuario-img';
|
|
7
7
|
import { RetInfraUsuarioEmail } from './model/ret-infrausuarioemail';
|
|
@@ -14,10 +14,10 @@ import * as i0 from "@angular/core";
|
|
|
14
14
|
export declare class MenuServicesService {
|
|
15
15
|
private _authStorageService;
|
|
16
16
|
private _httpClient;
|
|
17
|
-
private
|
|
17
|
+
private _customEnvironmentService;
|
|
18
18
|
private readonly _BASE_URL;
|
|
19
19
|
private readonly _HTTP_HEADERS;
|
|
20
|
-
constructor(_authStorageService: AuthStorageService, _httpClient: HttpClient,
|
|
20
|
+
constructor(_authStorageService: AuthStorageService, _httpClient: HttpClient, _customEnvironmentService: LibCustomEnvironmentService);
|
|
21
21
|
getEstabelecimentosModalList(usuarioID: string, pesquisa: string): Observable<RetEstabelecimentosModal>;
|
|
22
22
|
getImagemMenu(): Observable<RetInfraUsuarioImg>;
|
|
23
23
|
getEstabelecimentoSession(estabID: string): Observable<RetEstabelecimentoSession>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ICustomEnvironmentService } from "./models/icustom-environment-service";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class LibCustomEnvironmentService {
|
|
4
|
+
private _customEnvironmentService;
|
|
5
|
+
constructor(_customEnvironmentService: ICustomEnvironmentService);
|
|
6
|
+
get needsAuthInfra(): Map<string, string[]>;
|
|
7
|
+
get needsAuthAplic(): Map<string, string[]>;
|
|
8
|
+
get production(): boolean;
|
|
9
|
+
get hostName(): string;
|
|
10
|
+
get product(): string;
|
|
11
|
+
get Sp2LocalhostInfra2AuthWS(): string;
|
|
12
|
+
get Sp2LocalhostInfra2LoginWS(): string;
|
|
13
|
+
get Sp2LocalhostWS(): string;
|
|
14
|
+
get SpInfra2AuthWS(): string;
|
|
15
|
+
get SpInfra2LoginWS(): string;
|
|
16
|
+
get SpInfra2ErpWS(): string;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LibCustomEnvironmentService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LibCustomEnvironmentService>;
|
|
19
|
+
}
|
|
@@ -2,16 +2,17 @@ import { Router } from '@angular/router';
|
|
|
2
2
|
import { ICustomLoginService } from './models/icustom-login-service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class LibCustomLoginService {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
private _customLoginService;
|
|
6
|
+
constructor(_customLoginService: ICustomLoginService);
|
|
7
|
+
get loginTitle(): string;
|
|
8
|
+
get loginSubtitle(): string;
|
|
9
|
+
get loginBackground(): string;
|
|
10
|
+
get loginLogotipo(): string;
|
|
11
|
+
get loginAltLogotipo(): string;
|
|
12
|
+
get loginPageTitle(): string;
|
|
13
|
+
get loginDesenvDomain(): string;
|
|
14
|
+
get loginDesenvUser(): string;
|
|
15
|
+
get loginDesenvPassword(): string;
|
|
15
16
|
/**
|
|
16
17
|
* Método executado no auth.service.ts - método: login ()
|
|
17
18
|
* Utilizado para inicializações diversas
|
|
@@ -29,10 +30,6 @@ export declare class LibCustomLoginService {
|
|
|
29
30
|
* @param router Objeto de Router que será utilizado
|
|
30
31
|
*/
|
|
31
32
|
authNavigateToPage(router: Router): void;
|
|
32
|
-
storedAuthLogin: () => void;
|
|
33
|
-
storedAuthLogout: () => void;
|
|
34
|
-
storedAuthNavigateToPage: (router: Router) => void;
|
|
35
|
-
ConfigurarCustomLogin(customLoginService: ICustomLoginService): void;
|
|
36
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibCustomLoginService, never>;
|
|
37
34
|
static ɵprov: i0.ɵɵInjectableDeclaration<LibCustomLoginService>;
|
|
38
35
|
}
|
|
@@ -5,15 +5,15 @@ import { LibMenuConfigService } from './lib-menu-config.service';
|
|
|
5
5
|
import { ICustomMenuService } from './models/icustom-menu-service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class LibCustomMenuService {
|
|
8
|
+
private _customMenuService;
|
|
8
9
|
private _menuConfig;
|
|
9
10
|
private _authStorageService;
|
|
10
|
-
menuDynamic: boolean;
|
|
11
|
-
menuDynamicCustom: boolean;
|
|
12
|
-
moduleName: string;
|
|
13
|
-
moduleImg: string;
|
|
14
|
-
moduleSvg: string;
|
|
15
|
-
themeColor: string;
|
|
16
|
-
private _menuItems;
|
|
11
|
+
get menuDynamic(): boolean;
|
|
12
|
+
get menuDynamicCustom(): boolean;
|
|
13
|
+
get moduleName(): string;
|
|
14
|
+
get moduleImg(): string;
|
|
15
|
+
get moduleSvg(): string;
|
|
16
|
+
get themeColor(): string;
|
|
17
17
|
menuConfig: LibMenuConfigService;
|
|
18
18
|
/** Obtém as opções do menu. */
|
|
19
19
|
get menuItems(): IMenuItemStructure[];
|
|
@@ -27,18 +27,13 @@ export declare class LibCustomMenuService {
|
|
|
27
27
|
estabelecimentoID: string;
|
|
28
28
|
empresaID: string;
|
|
29
29
|
}): void;
|
|
30
|
-
constructor(_menuConfig: LibMenuConfigService, _authStorageService: AuthStorageService);
|
|
30
|
+
constructor(_customMenuService: ICustomMenuService, _menuConfig: LibMenuConfigService, _authStorageService: AuthStorageService);
|
|
31
31
|
menuDynamicGetModuloId(): number;
|
|
32
32
|
menuDynamicOnInit(): void;
|
|
33
33
|
menuStaticOnInit(): void;
|
|
34
34
|
menuopenExpansibleMenu(ref: HTMLDivElement): void;
|
|
35
35
|
/** Método que deve ser chamado na seleção de um novo estabelecimento, ele atualizará os valores do nosso BehaviorSubject para que possamos utilizá-lo em outras partes do sistema. */
|
|
36
36
|
emitEstabelecimentoEvent(): void;
|
|
37
|
-
private storeMenuDynamicGetModuloId;
|
|
38
|
-
private storedMenuStaticOnInit;
|
|
39
|
-
private storedMenuDynamicOnInit;
|
|
40
|
-
private storedMenuopenExpansibleMenu;
|
|
41
|
-
ConfigurarCustomMenuService(RealcustomMenuService: ICustomMenuService): void;
|
|
42
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibCustomMenuService, never>;
|
|
43
38
|
static ɵprov: i0.ɵɵInjectableDeclaration<LibCustomMenuService>;
|
|
44
39
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { ICustomStorageService } from './models/icustom-storage-service';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class LibCustomStorageService {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
storedStorageSaveLocalInstance(): void;
|
|
7
|
-
storedStorageLogout(): void;
|
|
8
|
-
storedStorageInitializeAutoStorage(): void;
|
|
4
|
+
private _customStorageService;
|
|
5
|
+
constructor(_customStorageService: ICustomStorageService);
|
|
9
6
|
storageConstructor(): void;
|
|
10
7
|
storageSaveLocalInstance(): void;
|
|
11
8
|
storageLogout(): void;
|
|
12
9
|
storageInitializeAutoStorage(): void;
|
|
13
|
-
InitializeCustomStorage(customStorageService: ICustomStorageService): void;
|
|
14
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibCustomStorageService, never>;
|
|
15
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<LibCustomStorageService>;
|
|
16
12
|
}
|
|
@@ -2,10 +2,8 @@ import { IMenuItemStructure } from '../components/menu-lateral/model/imenu-item-
|
|
|
2
2
|
import { IMenuConfig } from "./models/imenu-config";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class LibMenuConfigService {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
storedSetMenuType: (isStaticMenu: boolean) => void;
|
|
8
|
-
storedUpdateRouteSelection: (currentRoute: string, currentList: IMenuItemStructure[]) => IMenuItemStructure[];
|
|
5
|
+
private _menuConfig;
|
|
6
|
+
constructor(_menuConfig: IMenuConfig);
|
|
9
7
|
menu: IMenuItemStructure[];
|
|
10
8
|
menuDropdown: any[];
|
|
11
9
|
/** Inicializa as opções do menu com base na rota atual e em uma lista personalizada (opcional).
|
|
@@ -21,7 +19,6 @@ export declare class LibMenuConfigService {
|
|
|
21
19
|
* @returns As opções do dropdown inicializadas.
|
|
22
20
|
*/
|
|
23
21
|
initializeMenuDropdown(primaryDropdownList: Array<any>): any[];
|
|
24
|
-
ConfigurarMenuConfig(menuConfig: IMenuConfig): void;
|
|
25
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibMenuConfigService, never>;
|
|
26
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<LibMenuConfigService>;
|
|
27
24
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ICustomEnvironmentService {
|
|
2
|
+
get production(): boolean;
|
|
3
|
+
get hostName(): string;
|
|
4
|
+
get product(): string;
|
|
5
|
+
get Sp2LocalhostInfra2AuthWS(): string;
|
|
6
|
+
get Sp2LocalhostInfra2LoginWS(): string;
|
|
7
|
+
get Sp2LocalhostWS(): string;
|
|
8
|
+
get SpInfra2AuthWS(): string;
|
|
9
|
+
get SpInfra2LoginWS(): string;
|
|
10
|
+
get SpInfra2ErpWS(): string;
|
|
11
|
+
get needsAuthInfra(): Map<string, string[]>;
|
|
12
|
+
get needsAuthAplic(): Map<string, string[]>;
|
|
13
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Router } from "@angular/router";
|
|
2
2
|
export interface ICustomLoginService {
|
|
3
|
-
loginTitle: string;
|
|
4
|
-
loginSubtitle: string;
|
|
5
|
-
loginBackground: string;
|
|
6
|
-
loginLogotipo: string;
|
|
7
|
-
loginAltLogotipo: string;
|
|
8
|
-
loginPageTitle: string;
|
|
9
|
-
loginDesenvDomain: string;
|
|
10
|
-
loginDesenvUser: string;
|
|
11
|
-
loginDesenvPassword: string;
|
|
3
|
+
get loginTitle(): string;
|
|
4
|
+
get loginSubtitle(): string;
|
|
5
|
+
get loginBackground(): string;
|
|
6
|
+
get loginLogotipo(): string;
|
|
7
|
+
get loginAltLogotipo(): string;
|
|
8
|
+
get loginPageTitle(): string;
|
|
9
|
+
get loginDesenvDomain(): string;
|
|
10
|
+
get loginDesenvUser(): string;
|
|
11
|
+
get loginDesenvPassword(): string;
|
|
12
12
|
authLogin(): void;
|
|
13
13
|
authLogout(): void;
|
|
14
14
|
authNavigateToPage(router: Router): void;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { IMenuItemStructure } from "../../../public-api";
|
|
1
2
|
export interface ICustomMenuService {
|
|
2
|
-
menuDynamic: boolean;
|
|
3
|
-
menuDynamicCustom: false;
|
|
4
|
-
moduleName: string;
|
|
5
|
-
moduleImg: string;
|
|
6
|
-
moduleSvg: string;
|
|
7
|
-
themeColor: string;
|
|
3
|
+
get menuDynamic(): boolean;
|
|
4
|
+
get menuDynamicCustom(): false;
|
|
5
|
+
get moduleName(): string;
|
|
6
|
+
get moduleImg(): string;
|
|
7
|
+
get moduleSvg(): string;
|
|
8
|
+
get themeColor(): string;
|
|
9
|
+
get menuItems(): IMenuItemStructure[];
|
|
10
|
+
set menuItems(value: IMenuItemStructure[]);
|
|
8
11
|
menuDynamicGetModuloId(): number;
|
|
9
12
|
menuDynamicOnInit(): void;
|
|
10
13
|
menuStaticOnInit(): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InjectionToken } from "@angular/core";
|
|
2
|
+
import { ICustomEnvironmentService } from "./models/icustom-environment-service";
|
|
3
|
+
import { ICustomLoginService } from "./models/icustom-login-service";
|
|
4
|
+
import { ICustomStorageService } from "./models/icustom-storage-service";
|
|
5
|
+
import { ICustomMenuService } from "./models/icustom-menu-service";
|
|
6
|
+
import { IMenuConfig } from "./models/imenu-config";
|
|
7
|
+
export declare const LIB_CUSTOM_ENVIRONMENT_SERVICE: InjectionToken<ICustomEnvironmentService>;
|
|
8
|
+
export declare const LIB_CUSTOM_STORAGE_SERVICE: InjectionToken<ICustomStorageService>;
|
|
9
|
+
export declare const LIB_CUSTOM_LOGIN_SERVICE: InjectionToken<ICustomLoginService>;
|
|
10
|
+
export declare const LIB_CUSTOM_MENU_SERVICE: InjectionToken<ICustomMenuService>;
|
|
11
|
+
export declare const LIB_MENU_CONFIG: InjectionToken<IMenuConfig>;
|
|
@@ -2,7 +2,7 @@ import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/c
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
4
4
|
import { CheckUrlAndMethodService } from 'ngx-sp-infra';
|
|
5
|
-
import {
|
|
5
|
+
import { LibCustomEnvironmentService } from '../custom/lib-custom-environment.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* \brief Intercepta uma chamada HTTP para inserir o usuário logado no header em conjunto
|
|
@@ -13,8 +13,8 @@ import * as i0 from "@angular/core";
|
|
|
13
13
|
export declare class AuthAplicInterceptor implements HttpInterceptor {
|
|
14
14
|
private authCheckService;
|
|
15
15
|
private token;
|
|
16
|
-
private
|
|
17
|
-
constructor(authCheckService: CheckUrlAndMethodService, token: AuthStorageService,
|
|
16
|
+
private _customEnvironmentService;
|
|
17
|
+
constructor(authCheckService: CheckUrlAndMethodService, token: AuthStorageService, _customEnvironmentService: LibCustomEnvironmentService);
|
|
18
18
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
19
19
|
handle(req: HttpRequest<any>, next: HttpHandler): Promise<HttpEvent<any>>;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthAplicInterceptor, never>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { CheckUrlAndMethodService } from "ngx-sp-infra";
|
|
4
|
-
import {
|
|
4
|
+
import { LibCustomEnvironmentService } from '../custom/lib-custom-environment.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* \brief Intercepta uma chamada HTTP para inserir a autenticação da Sispro.
|
|
8
8
|
*/
|
|
9
9
|
export declare class AuthInfraInterceptor implements HttpInterceptor {
|
|
10
10
|
private authCheckService;
|
|
11
|
-
private
|
|
12
|
-
constructor(authCheckService: CheckUrlAndMethodService,
|
|
11
|
+
private _customEnvironmentService;
|
|
12
|
+
constructor(authCheckService: CheckUrlAndMethodService, _customEnvironmentService: LibCustomEnvironmentService);
|
|
13
13
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthInfraInterceptor, never>;
|
|
15
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthInfraInterceptor>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Router } from '@angular/router';
|
|
2
2
|
import { CheckUrlAndMethodService, MessageService } from 'ngx-sp-infra';
|
|
3
3
|
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
4
|
-
import {
|
|
4
|
+
import { LibCustomEnvironmentService } from '../custom/lib-custom-environment.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class ProjectUtilservice {
|
|
7
7
|
private router;
|
|
8
8
|
private authStorageService;
|
|
9
9
|
private checkUrlAndMethodService;
|
|
10
10
|
private messageService;
|
|
11
|
-
private
|
|
12
|
-
constructor(router: Router, authStorageService: AuthStorageService, checkUrlAndMethodService: CheckUrlAndMethodService, messageService: MessageService,
|
|
11
|
+
private _customEnvironmentService;
|
|
12
|
+
constructor(router: Router, authStorageService: AuthStorageService, checkUrlAndMethodService: CheckUrlAndMethodService, messageService: MessageService, _customEnvironmentService: LibCustomEnvironmentService);
|
|
13
13
|
showHttpError(error: any): void;
|
|
14
14
|
private showExpiredAccess;
|
|
15
15
|
getHostName(): string;
|
|
@@ -2,19 +2,19 @@ import { HttpBackend } from '@angular/common/http';
|
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
3
|
import { Payload } from './../models/payload';
|
|
4
4
|
import { LibCustomStorageService } from '../custom/lib-custom-storage.service';
|
|
5
|
-
import {
|
|
5
|
+
import { LibCustomEnvironmentService } from '../custom/lib-custom-environment.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class AuthStorageService {
|
|
8
8
|
private _httpBackend;
|
|
9
9
|
private _customStorageService;
|
|
10
|
-
private
|
|
10
|
+
private _customEnvironmentService;
|
|
11
11
|
private readonly _BASE_URL;
|
|
12
12
|
private readonly __local_key;
|
|
13
13
|
private __isSaving;
|
|
14
14
|
/** Se ainda estamos com uma função rodando para verificar o login do usuário */
|
|
15
15
|
private __isCheckingAuth;
|
|
16
16
|
private _httpClient;
|
|
17
|
-
constructor(_httpBackend: HttpBackend, _customStorageService: LibCustomStorageService,
|
|
17
|
+
constructor(_httpBackend: HttpBackend, _customStorageService: LibCustomStorageService, _customEnvironmentService: LibCustomEnvironmentService);
|
|
18
18
|
isLoggedInSub: BehaviorSubject<boolean>;
|
|
19
19
|
private __ip;
|
|
20
20
|
get ip(): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-sp-auth",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Biblioteca de utilitários da Infra.",
|
|
5
5
|
"author": "P&D",
|
|
6
6
|
"keywords": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@azure/msal-angular": "^4.0.16",
|
|
24
24
|
"@azure/msal-browser": "^4.18.0",
|
|
25
|
-
"ngx-sp-infra": "^5.
|
|
25
|
+
"ngx-sp-infra": "^5.13.0",
|
|
26
26
|
"ngx-toastr": "^19.0.0"
|
|
27
27
|
},
|
|
28
28
|
"sideEffects": false,
|
package/public-api.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/** Modules */
|
|
1
2
|
export * from './lib/auth.module';
|
|
2
3
|
/** Services */
|
|
3
4
|
export * from './lib/auth.service';
|
|
4
|
-
export * from './lib/
|
|
5
|
+
export * from './lib/custom/lib-custom-environment.service';
|
|
5
6
|
export * from './lib/components/menu-lateral/menu-services.service';
|
|
6
7
|
export * from './lib/storage/auth-storage.service';
|
|
7
8
|
export * from './lib/custom/lib-custom-login.service';
|
|
@@ -22,15 +23,17 @@ export * from './lib/components/nova-senha/nova-senhacomponent';
|
|
|
22
23
|
export * from './lib/components/menu-lateral/model/imenu-item-structure.model';
|
|
23
24
|
export * from './lib/components/menu-lateral/model/imenu.model';
|
|
24
25
|
export * from './lib/components/menu-lateral/model/infrausuarioimg';
|
|
26
|
+
export * from './lib/components/menu-lateral/model/ret-infrausuarioimg';
|
|
25
27
|
export * from './lib/components/menu-lateral/model/ret-menu-item-structure';
|
|
26
28
|
export * from './lib/components/menu-lateral/model/ret-menu-lateral';
|
|
27
29
|
export * from './lib/components/menu-lateral/model/ret-menu-promise';
|
|
28
30
|
export * from './lib/components/menu-lateral/model/ret-navsubmenu';
|
|
31
|
+
/** Custom */
|
|
29
32
|
export * from './lib/custom/models/icustom-login-service';
|
|
30
33
|
export * from './lib/custom/models/icustom-menu-service';
|
|
31
34
|
export * from './lib/custom/models/imenu-config';
|
|
32
35
|
export * from './lib/custom/models/icustom-storage-service';
|
|
33
|
-
export * from './lib/
|
|
36
|
+
export * from './lib/custom/models/icustom-environment-service';
|
|
34
37
|
/** Guards */
|
|
35
38
|
export * from './lib/guards/auth-guard';
|
|
36
39
|
export * from './lib/guards/external-login-guard';
|
|
@@ -41,5 +44,5 @@ export * from './lib/interceptors/auth-aplic.interceptor';
|
|
|
41
44
|
export * from './lib/interceptors/auth-infra.interceptor';
|
|
42
45
|
/** Routes */
|
|
43
46
|
export * from './lib/auth.routes';
|
|
44
|
-
/**
|
|
45
|
-
export * from './lib/
|
|
47
|
+
/** Providers */
|
|
48
|
+
export * from './lib/custom/token';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IEnvironments } from "./models/ienvironments";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class EnvironmentService {
|
|
4
|
-
needsAuthInfra: Map<string, string[]>;
|
|
5
|
-
needsAuthAplic: Map<string, string[]>;
|
|
6
|
-
production: boolean;
|
|
7
|
-
hostName: string;
|
|
8
|
-
product: string;
|
|
9
|
-
Sp2LocalhostInfra2AuthWS: string;
|
|
10
|
-
Sp2LocalhostInfra2LoginWS: string;
|
|
11
|
-
Sp2Localhost: string;
|
|
12
|
-
SpInfra2AuthWS: string;
|
|
13
|
-
SpInfra2LoginWS: string;
|
|
14
|
-
SpInfra2ErpWS: string;
|
|
15
|
-
ConfigurarEnvironments(properties: IEnvironments): void;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<EnvironmentService>;
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface IEnvironments {
|
|
2
|
-
production: boolean;
|
|
3
|
-
hostName: string;
|
|
4
|
-
product: string;
|
|
5
|
-
Sp2LocalhostInfra2AuthWS: string;
|
|
6
|
-
Sp2LocalhostInfra2LoginWS: string;
|
|
7
|
-
Sp2LocalhostWS: string;
|
|
8
|
-
SpInfra2AuthWS: string;
|
|
9
|
-
SpInfra2LoginWS: string;
|
|
10
|
-
SpInfra2ErpWS: string;
|
|
11
|
-
needsAuthInfra: Map<string, string[]>;
|
|
12
|
-
needsAuthAplic: Map<string, string[]>;
|
|
13
|
-
}
|