ngx-sp-auth 0.0.0-watch
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/README.md +24 -0
- package/esm2022/lib/auth.module.mjs +87 -0
- package/esm2022/lib/auth.service.mjs +306 -0
- package/esm2022/lib/components/login/login.component.mjs +326 -0
- package/esm2022/lib/components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component.mjs +68 -0
- package/esm2022/lib/components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component.mjs +32 -0
- package/esm2022/lib/components/menu-lateral/menu/list-estab.service.mjs +55 -0
- package/esm2022/lib/components/menu-lateral/menu/menu-lateral.component.mjs +235 -0
- package/esm2022/lib/components/menu-lateral/menu/selecao-estabelecimentos-modal/selecao-estabelecimentos-modal.component.mjs +200 -0
- package/esm2022/lib/components/menu-lateral/menu-services.service.mjs +151 -0
- package/esm2022/lib/components/menu-lateral/model/iestabelecimento.model.mjs +2 -0
- package/esm2022/lib/components/menu-lateral/model/imenu-item-structure.model.mjs +2 -0
- package/esm2022/lib/components/menu-lateral/model/imenu.model.mjs +12 -0
- package/esm2022/lib/components/menu-lateral/model/infrausuarioimg.mjs +12 -0
- package/esm2022/lib/components/menu-lateral/model/isubmenu-item-structure.model.mjs +2 -0
- package/esm2022/lib/components/menu-lateral/model/ret-estabelecimento-session.mjs +10 -0
- package/esm2022/lib/components/menu-lateral/model/ret-infrausuarioemail.mjs +8 -0
- package/esm2022/lib/components/menu-lateral/model/ret-infrausuarioimg.mjs +11 -0
- package/esm2022/lib/components/menu-lateral/model/usuario-img.mjs +8 -0
- package/esm2022/lib/components/menu-lateral/submenus/dynamic-menu/dynamic-menu.component.mjs +54 -0
- package/esm2022/lib/components/menu-lateral/submenus/notif-submenu/notif-submenu.component.mjs +14 -0
- package/esm2022/lib/components/nova-senha/nova-senhacomponent.mjs +191 -0
- package/esm2022/lib/custom/custom-login.service.mjs +52 -0
- package/esm2022/lib/custom/custom-menu.service.mjs +88 -0
- package/esm2022/lib/custom/menu-config.service.mjs +70 -0
- package/esm2022/lib/custom/models/icustom-login-service.mjs +2 -0
- package/esm2022/lib/custom/models/icustom-menu-service.mjs +2 -0
- package/esm2022/lib/custom/models/imenu-config.mjs +2 -0
- package/esm2022/lib/environments/environments.service.mjs +21 -0
- package/esm2022/lib/environments/models/ienvironments.mjs +2 -0
- package/esm2022/lib/guards/auth-guard.mjs +34 -0
- package/esm2022/lib/guards/external-login-guard.mjs +88 -0
- package/esm2022/lib/guards/login-guard.mjs +35 -0
- package/esm2022/lib/interceptors/auth-aplic.interceptor.mjs +41 -0
- package/esm2022/lib/interceptors/auth-infra.interceptor.mjs +30 -0
- package/esm2022/lib/models/code-2fa.mjs +2 -0
- package/esm2022/lib/models/custom-propriedades-login.mjs +3 -0
- package/esm2022/lib/models/forgotten-password-form.mjs +2 -0
- package/esm2022/lib/models/login-form.mjs +2 -0
- package/esm2022/lib/models/login.mjs +2 -0
- package/esm2022/lib/models/nova-senha-form.mjs +2 -0
- package/esm2022/lib/models/password-recup.mjs +2 -0
- package/esm2022/lib/models/payload.mjs +2 -0
- package/esm2022/lib/models/ret-login.mjs +21 -0
- package/esm2022/lib/models/ret-token.mjs +8 -0
- package/esm2022/lib/models/token.mjs +2 -0
- package/esm2022/lib/server/ret-server-config.mjs +9 -0
- package/esm2022/lib/server/server.service.mjs +38 -0
- package/esm2022/lib/storage/auth-storage.service.mjs +409 -0
- package/esm2022/ngx-sp-auth.mjs +5 -0
- package/esm2022/public-api.mjs +37 -0
- package/fesm2022/ngx-sp-auth.mjs +2520 -0
- package/fesm2022/ngx-sp-auth.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/auth.module.d.ts +21 -0
- package/lib/auth.service.d.ts +42 -0
- package/lib/components/login/login.component.d.ts +67 -0
- package/lib/components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component.d.ts +20 -0
- package/lib/components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component.d.ts +12 -0
- package/lib/components/menu-lateral/menu/list-estab.service.d.ts +19 -0
- package/lib/components/menu-lateral/menu/menu-lateral.component.d.ts +74 -0
- package/lib/components/menu-lateral/menu/selecao-estabelecimentos-modal/selecao-estabelecimentos-modal.component.d.ts +71 -0
- package/lib/components/menu-lateral/menu-services.service.d.ts +31 -0
- package/lib/components/menu-lateral/model/iestabelecimento.model.d.ts +4 -0
- package/lib/components/menu-lateral/model/imenu-item-structure.model.d.ts +12 -0
- package/lib/components/menu-lateral/model/imenu.model.d.ts +40 -0
- package/lib/components/menu-lateral/model/infrausuarioimg.d.ts +9 -0
- package/lib/components/menu-lateral/model/isubmenu-item-structure.model.d.ts +9 -0
- package/lib/components/menu-lateral/model/ret-estabelecimento-session.d.ts +8 -0
- package/lib/components/menu-lateral/model/ret-infrausuarioemail.d.ts +6 -0
- package/lib/components/menu-lateral/model/ret-infrausuarioimg.d.ts +9 -0
- package/lib/components/menu-lateral/model/usuario-img.d.ts +5 -0
- package/lib/components/menu-lateral/submenus/dynamic-menu/dynamic-menu.component.d.ts +25 -0
- package/lib/components/menu-lateral/submenus/notif-submenu/notif-submenu.component.d.ts +8 -0
- package/lib/components/nova-senha/nova-senhacomponent.d.ts +48 -0
- package/lib/custom/custom-login.service.d.ts +38 -0
- package/lib/custom/custom-menu.service.d.ts +48 -0
- package/lib/custom/menu-config.service.d.ts +32 -0
- package/lib/custom/models/icustom-login-service.d.ts +13 -0
- package/lib/custom/models/icustom-menu-service.d.ts +10 -0
- package/lib/custom/models/imenu-config.d.ts +7 -0
- package/lib/environments/environments.service.d.ts +11 -0
- package/lib/environments/models/ienvironments.d.ts +4 -0
- package/lib/guards/auth-guard.d.ts +14 -0
- package/lib/guards/external-login-guard.d.ts +21 -0
- package/lib/guards/login-guard.d.ts +24 -0
- package/lib/interceptors/auth-aplic.interceptor.d.ts +22 -0
- package/lib/interceptors/auth-infra.interceptor.d.ts +16 -0
- package/lib/models/code-2fa.d.ts +4 -0
- package/lib/models/custom-propriedades-login.d.ts +11 -0
- package/lib/models/forgotten-password-form.d.ts +5 -0
- package/lib/models/login-form.d.ts +5 -0
- package/lib/models/login.d.ts +4 -0
- package/lib/models/nova-senha-form.d.ts +5 -0
- package/lib/models/password-recup.d.ts +5 -0
- package/lib/models/payload.d.ts +9 -0
- package/lib/models/ret-login.d.ts +20 -0
- package/lib/models/ret-token.d.ts +6 -0
- package/lib/models/token.d.ts +8 -0
- package/lib/server/ret-server-config.d.ts +7 -0
- package/lib/server/server.service.d.ts +14 -0
- package/lib/storage/auth-storage.service.d.ts +90 -0
- package/package.json +25 -0
- package/public-api.d.ts +36 -0
- package/src/assets/imgs/Property1-cadeado.png +0 -0
- package/src/assets/imgs/Property1-calendariofino.png +0 -0
- package/src/assets/imgs/Property1-mao.png +0 -0
- package/src/assets/styles/styles.novo.scss +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { IMenuItemStructure } from '../components/menu-lateral/model/imenu-item-structure.model';
|
|
4
|
+
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
5
|
+
import { MenuConfigService } from './menu-config.service';
|
|
6
|
+
import { ICustomMenuService } from './models/icustom-menu-service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class LibCustomMenuService {
|
|
9
|
+
private _menuConfig;
|
|
10
|
+
private _authStorageService;
|
|
11
|
+
private _router;
|
|
12
|
+
menuService: ICustomMenuService;
|
|
13
|
+
menuDynamic: boolean;
|
|
14
|
+
moduleName: string;
|
|
15
|
+
moduleImg: string;
|
|
16
|
+
moduleSvg: string;
|
|
17
|
+
themeColor: string;
|
|
18
|
+
private readonly _MENU_BASE_URL;
|
|
19
|
+
private currentURL;
|
|
20
|
+
private _menuItems;
|
|
21
|
+
private menuList;
|
|
22
|
+
private menuLateralUpdated;
|
|
23
|
+
menuConfig: MenuConfigService;
|
|
24
|
+
/** Obtém as opções do menu. */
|
|
25
|
+
get menuItems(): IMenuItemStructure[];
|
|
26
|
+
set menuItems(value: IMenuItemStructure[]);
|
|
27
|
+
private empresaId;
|
|
28
|
+
applyEmpresa$: Observable<{
|
|
29
|
+
estabelecimentoID: string;
|
|
30
|
+
empresaID: string;
|
|
31
|
+
}>;
|
|
32
|
+
setEmpresa(value: {
|
|
33
|
+
estabelecimentoID: string;
|
|
34
|
+
empresaID: string;
|
|
35
|
+
}): void;
|
|
36
|
+
private storedMenuStaticOnInit?;
|
|
37
|
+
private storedMenuDynamicOnInit?;
|
|
38
|
+
private storedMenuopenExpansibleMenu?;
|
|
39
|
+
constructor(_menuConfig: MenuConfigService, _authStorageService: AuthStorageService, _router: Router);
|
|
40
|
+
ConfigurarCustomMenuService(RealcustomMenuService: ICustomMenuService): void;
|
|
41
|
+
menuDynamicOnInit(): void;
|
|
42
|
+
menuStaticOnInit(): void;
|
|
43
|
+
menuopenExpansibleMenu(ref: HTMLDivElement): void;
|
|
44
|
+
/** 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. */
|
|
45
|
+
emitEstabelecimentoEvent(): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LibCustomMenuService, never>;
|
|
47
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LibCustomMenuService>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IMenuItemStructure } from './../components/menu-lateral/model/imenu-item-structure.model';
|
|
2
|
+
import { IMenuConfig } from "./models/imenu-config";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MenuConfigService {
|
|
5
|
+
private _menuOptions;
|
|
6
|
+
/** Indica se o menu é estático ou dinâmico. */
|
|
7
|
+
_isMenuStatic: boolean;
|
|
8
|
+
/** Obtém as opções do menu. */
|
|
9
|
+
get menuOptions(): IMenuItemStructure[];
|
|
10
|
+
set menuOptions(value: IMenuItemStructure[]);
|
|
11
|
+
storedInitializeMenu: (currentRoute: string, customList?: IMenuItemStructure[]) => IMenuItemStructure[];
|
|
12
|
+
storedUpdateRouteSelection: (currentRoute: string, currentList: IMenuItemStructure[]) => IMenuItemStructure[];
|
|
13
|
+
storedInitializeMenuDropdown: (primaryDropdownList: Array<any>) => any[];
|
|
14
|
+
menu: IMenuItemStructure[];
|
|
15
|
+
menuDropdown: any[];
|
|
16
|
+
/** Inicializa as opções do menu com base na rota atual e em uma lista personalizada (opcional).
|
|
17
|
+
* @param currentRoute A rota atual da aplicação
|
|
18
|
+
* @param customList Uma lista personalizada de opções de menu (opcional).
|
|
19
|
+
* @returns As opções do menu inicializadas.
|
|
20
|
+
*/
|
|
21
|
+
setMenuStatic(isStaticMenu: boolean): void;
|
|
22
|
+
initializeMenu(currentRoute: string, customList?: IMenuItemStructure[]): IMenuItemStructure[];
|
|
23
|
+
updateRouteSelection(currentRoute: string, currentList: IMenuItemStructure[]): IMenuItemStructure[];
|
|
24
|
+
/** Inicializa as opções do menu dropdown com base em uma lista personalizada (opcional).
|
|
25
|
+
* @param primaryDropdownList Uma lista personalizada de opções do dropdown (opcional).
|
|
26
|
+
* @returns As opções do dropdown inicializadas.
|
|
27
|
+
*/
|
|
28
|
+
initializeMenuDropdown(primaryDropdownList: Array<any>): any[];
|
|
29
|
+
ConfigurarMenuConfig(menuConfig: IMenuConfig): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuConfigService, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MenuConfigService>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ICustomLoginService {
|
|
2
|
+
loginTitle: string;
|
|
3
|
+
loginSubtitle: string;
|
|
4
|
+
loginBackground: string;
|
|
5
|
+
loginLogotipo: string;
|
|
6
|
+
loginAltLogotipo: string;
|
|
7
|
+
loginPageTitle: string;
|
|
8
|
+
loginDesenvDomain: string;
|
|
9
|
+
loginDesenvUser: string;
|
|
10
|
+
loginDesenvPassword: string;
|
|
11
|
+
authLogin(): void;
|
|
12
|
+
authLogout(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ICustomMenuService {
|
|
2
|
+
menuDynamic: boolean;
|
|
3
|
+
moduleName: string;
|
|
4
|
+
moduleImg: string;
|
|
5
|
+
moduleSvg: string;
|
|
6
|
+
themeColor: string;
|
|
7
|
+
menuDynamicOnInit(): void;
|
|
8
|
+
menuStaticOnInit(): void;
|
|
9
|
+
menuopenExpansibleMenu(ref: HTMLDivElement): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IMenuItemStructure } from "../../components/menu-lateral/model/imenu-item-structure.model";
|
|
2
|
+
export interface IMenuConfig {
|
|
3
|
+
menuOptions: IMenuItemStructure[];
|
|
4
|
+
isMenuStatic: boolean;
|
|
5
|
+
initializeMenu(currentRoute: string, customList?: IMenuItemStructure[]): IMenuItemStructure[];
|
|
6
|
+
initializeMenuDropdown(primaryDropdownList: Array<any>): Array<any>[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
ConfigurarEnvironments(propriedades: IEnvironments): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EnvironmentService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Router, RouterStateSnapshot, ActivatedRouteSnapshot, Route, UrlTree } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AuthGuard {
|
|
6
|
+
private router;
|
|
7
|
+
private authStorageService;
|
|
8
|
+
constructor(router: Router, authStorageService: AuthStorageService);
|
|
9
|
+
IsUserAuth(): Observable<boolean | UrlTree>;
|
|
10
|
+
canActivate(_route: ActivatedRouteSnapshot, _state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
|
11
|
+
canLoad(_route: Route): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuard, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuard>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Router, RouterStateSnapshot, ActivatedRouteSnapshot, UrlTree } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ServerService } from '../server/server.service';
|
|
4
|
+
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
5
|
+
import { AuthService } from '../auth.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ExternaLoginlGuard {
|
|
8
|
+
private router;
|
|
9
|
+
private authService;
|
|
10
|
+
private authStorageService;
|
|
11
|
+
private serverService;
|
|
12
|
+
constructor(router: Router, authService: AuthService, authStorageService: AuthStorageService, serverService: ServerService);
|
|
13
|
+
canActivate(_route: ActivatedRouteSnapshot, _state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
|
14
|
+
private navigateToError;
|
|
15
|
+
private IsUserAuth;
|
|
16
|
+
private logOnExternal;
|
|
17
|
+
private getServer;
|
|
18
|
+
private handleGetServer;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExternaLoginlGuard, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ExternaLoginlGuard>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Route, Router, UrlSegment, UrlTree } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Protege a página de login de ser carregada quando o usuário já está logado,
|
|
7
|
+
* redirecionando ele para a página home da aplicação.
|
|
8
|
+
*/
|
|
9
|
+
export declare class LoginGuard {
|
|
10
|
+
private router;
|
|
11
|
+
private authStorageService;
|
|
12
|
+
constructor(router: Router, authStorageService: AuthStorageService);
|
|
13
|
+
/**
|
|
14
|
+
* Verifica se pode carregar a tela de login caso o usuário não esteja logado e
|
|
15
|
+
* a rota seja de login.
|
|
16
|
+
*
|
|
17
|
+
* @param route Rota atual
|
|
18
|
+
* @param segments Segmentos.
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
canLoad(_route: Route, _segments: UrlSegment[]): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree>;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginGuard, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LoginGuard>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { EnvironmentService } from './../environments/environments.service';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { CheckUrlAndMethodService } from 'ngx-sp-infra';
|
|
5
|
+
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
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
|
+
*
|
|
11
|
+
* Depende do serviço de autenticação.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AuthAplicInterceptor implements HttpInterceptor {
|
|
14
|
+
private authCheckService;
|
|
15
|
+
private _environmentService;
|
|
16
|
+
private token;
|
|
17
|
+
constructor(authCheckService: CheckUrlAndMethodService, _environmentService: EnvironmentService, token: AuthStorageService);
|
|
18
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
19
|
+
handle(req: HttpRequest<any>, next: HttpHandler): Promise<HttpEvent<any>>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthAplicInterceptor, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthAplicInterceptor>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http";
|
|
2
|
+
import { EnvironmentService } from './../environments/environments.service';
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { CheckUrlAndMethodService } from "ngx-sp-infra";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* \brief Intercepta uma chamada HTTP para inserir a autenticação da Sispro.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AuthInfraInterceptor implements HttpInterceptor {
|
|
10
|
+
private authCheckService;
|
|
11
|
+
private _environmentService;
|
|
12
|
+
constructor(authCheckService: CheckUrlAndMethodService, _environmentService: EnvironmentService);
|
|
13
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthInfraInterceptor, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthInfraInterceptor>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class CustomPropriedadesLogin {
|
|
2
|
+
loginTitle: string;
|
|
3
|
+
loginSubtitle: string;
|
|
4
|
+
loginBackground: string;
|
|
5
|
+
loginLogotipo: string;
|
|
6
|
+
loginAltLogotipo: string;
|
|
7
|
+
loginPageTitle: string;
|
|
8
|
+
loginDesenvDomain: string;
|
|
9
|
+
loginDesenvUser: string;
|
|
10
|
+
loginDesenvPassword: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IError } from "ngx-sp-infra";
|
|
2
|
+
export declare class RetLogin implements IError {
|
|
3
|
+
Error: boolean;
|
|
4
|
+
ErrorMessage: string;
|
|
5
|
+
TenantId: number;
|
|
6
|
+
EstabelecimentoId: string;
|
|
7
|
+
NomeEstabelecimento: string;
|
|
8
|
+
EmpresaId: string;
|
|
9
|
+
NomeEmpresa: string;
|
|
10
|
+
InfraUsuarioId: string;
|
|
11
|
+
UserName: string;
|
|
12
|
+
Token: string;
|
|
13
|
+
Dominio: string;
|
|
14
|
+
InitializePassword: boolean;
|
|
15
|
+
InfraInAuthTypeId: number;
|
|
16
|
+
InfraIn2FaTypeId?: number | null;
|
|
17
|
+
Is2FaEnabled: boolean;
|
|
18
|
+
FeedbackMessage: string;
|
|
19
|
+
statusSenha: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RetServerConfig } from './ret-server-config';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ServerService {
|
|
6
|
+
private _httpClient;
|
|
7
|
+
private readonly _HOSTNAME;
|
|
8
|
+
private readonly _BASE_URL;
|
|
9
|
+
private readonly _HTTP_HEADERS;
|
|
10
|
+
constructor(_httpClient: HttpClient);
|
|
11
|
+
getServer(): Observable<RetServerConfig>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ServerService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ServerService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { HttpBackend } from '@angular/common/http';
|
|
2
|
+
import { Payload } from './../models/payload';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AuthStorageService {
|
|
6
|
+
private _httpBackend;
|
|
7
|
+
private readonly _HOSTNAME;
|
|
8
|
+
private readonly _BASE_URL;
|
|
9
|
+
private readonly __local_key;
|
|
10
|
+
private __isSaving;
|
|
11
|
+
/** Se ainda estamos com uma função rodando para verificar o login do usuário */
|
|
12
|
+
private __isCheckingAuth;
|
|
13
|
+
private _httpClient;
|
|
14
|
+
constructor(_httpBackend: HttpBackend);
|
|
15
|
+
isLoggedInSub: BehaviorSubject<boolean>;
|
|
16
|
+
private __ip;
|
|
17
|
+
get ip(): string;
|
|
18
|
+
set ip(value: string);
|
|
19
|
+
private __tenantId;
|
|
20
|
+
get tenantId(): number;
|
|
21
|
+
set tenantId(value: number);
|
|
22
|
+
private __infraUsuarioId;
|
|
23
|
+
get infraUsuarioId(): string;
|
|
24
|
+
set infraUsuarioId(value: string);
|
|
25
|
+
private __infraEstabId;
|
|
26
|
+
get infraEstabId(): string;
|
|
27
|
+
set infraEstabId(value: string);
|
|
28
|
+
private __infraEstabNome;
|
|
29
|
+
get infraEstabNome(): string;
|
|
30
|
+
set infraEstabNome(value: string);
|
|
31
|
+
private __infraEmpresaId;
|
|
32
|
+
get infraEmpresaId(): string;
|
|
33
|
+
set infraEmpresaId(value: string);
|
|
34
|
+
private __infraEmpresaNome;
|
|
35
|
+
get infraEmpresaNome(): string;
|
|
36
|
+
set infraEmpresaNome(value: string);
|
|
37
|
+
private __user;
|
|
38
|
+
get user(): string;
|
|
39
|
+
set user(value: string);
|
|
40
|
+
private __userName;
|
|
41
|
+
get userName(): string;
|
|
42
|
+
set userName(value: string);
|
|
43
|
+
private __tokenPayload;
|
|
44
|
+
get tokenPayload(): Payload;
|
|
45
|
+
private __authToken;
|
|
46
|
+
get authToken(): string;
|
|
47
|
+
set authToken(value: string);
|
|
48
|
+
/** Domínio */
|
|
49
|
+
private __dominio;
|
|
50
|
+
get dominio(): string;
|
|
51
|
+
set dominio(value: string);
|
|
52
|
+
private __UrlRedirect;
|
|
53
|
+
get urlRedirect(): string;
|
|
54
|
+
set urlRedirect(value: string);
|
|
55
|
+
private __isExternalLogin;
|
|
56
|
+
get isExternalLogin(): boolean;
|
|
57
|
+
set isExternalLogin(value: boolean);
|
|
58
|
+
/** Se é para ignorar o método reCheckLogin */
|
|
59
|
+
private __ignoreCheckLogin;
|
|
60
|
+
get ignoreCheckLogin(): boolean;
|
|
61
|
+
set ignoreCheckLogin(value: boolean);
|
|
62
|
+
private __saveLocalInstance;
|
|
63
|
+
private __notSaving;
|
|
64
|
+
/**
|
|
65
|
+
* Salva a instância como JSON seguro, ignorando objetos que não podem se tornar um JSON.
|
|
66
|
+
*/
|
|
67
|
+
toJson(): string;
|
|
68
|
+
/** Inicia a verificação do login. */
|
|
69
|
+
startLoginCheck(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Verifica a cada diferença de tempo entre a data atual e a data do token.
|
|
72
|
+
*/
|
|
73
|
+
reCheckLogin(): Promise<void>;
|
|
74
|
+
logout(): void;
|
|
75
|
+
private getNewTokenBack;
|
|
76
|
+
private getNewToken;
|
|
77
|
+
/**
|
|
78
|
+
* Renova o Token quando este estiver vencido.
|
|
79
|
+
*/
|
|
80
|
+
renewToken(): Promise<void>;
|
|
81
|
+
private isPrePortal;
|
|
82
|
+
storageConstructor(callback?: () => void): void;
|
|
83
|
+
storageSaveLocalInstance(callback?: () => void): void;
|
|
84
|
+
storageLogout(callback?: () => void): void;
|
|
85
|
+
storageInitializeAutoStorage(callback?: () => void): void;
|
|
86
|
+
private __authStorageSaveLocalInstance;
|
|
87
|
+
private __authStorageNotSaving;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthStorageService, never>;
|
|
89
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthStorageService>;
|
|
90
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ngx-sp-auth",
|
|
3
|
+
"version": "0.0.0-watch+1740596988680",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"ngx-sp-infra": "^3.13.3-next",
|
|
6
|
+
"ngx-toastr": "^19.0.0"
|
|
7
|
+
},
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"module": "fesm2022/ngx-sp-auth.mjs",
|
|
10
|
+
"typings": "index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
"./package.json": {
|
|
13
|
+
"default": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./index.d.ts",
|
|
17
|
+
"esm2022": "./esm2022/ngx-sp-auth.mjs",
|
|
18
|
+
"esm": "./esm2022/ngx-sp-auth.mjs",
|
|
19
|
+
"default": "./fesm2022/ngx-sp-auth.mjs"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"tslib": "^2.3.0"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export * from './lib/auth.module';
|
|
2
|
+
/** Services */
|
|
3
|
+
export * from './lib/auth.service';
|
|
4
|
+
export * from './lib/components/menu-lateral/menu-services.service';
|
|
5
|
+
export * from './lib/components/menu-lateral/menu/list-estab.service';
|
|
6
|
+
export * from './lib/custom/custom-login.service';
|
|
7
|
+
export * from './lib/custom/custom-menu.service';
|
|
8
|
+
export * from './lib/custom/menu-config.service';
|
|
9
|
+
export * from './lib/environments/environments.service';
|
|
10
|
+
export * from './lib/server/server.service';
|
|
11
|
+
export * from './lib/storage/auth-storage.service';
|
|
12
|
+
/** Components */
|
|
13
|
+
export * from './lib/components/login/login.component';
|
|
14
|
+
export * from './lib/components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component';
|
|
15
|
+
export * from './lib/components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component';
|
|
16
|
+
export * from './lib/components/menu-lateral/menu/menu-lateral.component';
|
|
17
|
+
export * from './lib/components/menu-lateral/menu/selecao-estabelecimentos-modal/selecao-estabelecimentos-modal.component';
|
|
18
|
+
export * from './lib/components/menu-lateral/submenus/dynamic-menu/dynamic-menu.component';
|
|
19
|
+
export * from './lib/components/menu-lateral/submenus/notif-submenu/notif-submenu.component';
|
|
20
|
+
export * from './lib/components/nova-senha/nova-senhacomponent';
|
|
21
|
+
/** Models */
|
|
22
|
+
export * from './lib/components/menu-lateral/model/imenu-item-structure.model';
|
|
23
|
+
export * from './lib/components/menu-lateral/model/imenu.model';
|
|
24
|
+
export * from './lib/components/menu-lateral/model/infrausuarioimg';
|
|
25
|
+
export * from './lib/custom/models/icustom-login-service';
|
|
26
|
+
export * from './lib/custom/models/icustom-menu-service';
|
|
27
|
+
export * from './lib/custom/models/imenu-config';
|
|
28
|
+
export * from './lib/environments/models/ienvironments';
|
|
29
|
+
export * from './lib/models/custom-propriedades-login';
|
|
30
|
+
/** Guards */
|
|
31
|
+
export * from './lib/guards/auth-guard';
|
|
32
|
+
export * from './lib/guards/external-login-guard';
|
|
33
|
+
export * from './lib/guards/login-guard';
|
|
34
|
+
/** Interceptors */
|
|
35
|
+
export * from './lib/interceptors/auth-aplic.interceptor';
|
|
36
|
+
export * from './lib/interceptors/auth-infra.interceptor';
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|