fge-auth-component 0.4.2 → 1.0.1

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 CHANGED
@@ -19,11 +19,14 @@ Dependencias requeridas con sus respectivas versiones que fuuncionan en el compo
19
19
  "vue": "^3.2.47",
20
20
  "yup": "^1.1.1"
21
21
 
22
- El componente requiere la instalacion de primeicons para los iconos por defecto
22
+ El componente requiere la instalacion de primeicons y primeflex de npm para los iconos por defecto
23
+ y estilos
24
+ import 'primevue/resources/primevue.min.css';
23
25
  import 'primeicons/primeicons.css';
26
+ import 'primeflex/primeflex.min.css';
24
27
 
25
- El componente utiliza la fuente 'Roboto', 'Roboto Condensed' que deben ser agregados en el proyecto que se utilizara para
26
- el correcto visualizado
28
+ El componente utiliza la fuente 'Roboto', 'Roboto Condensed' que deben ser agregados
29
+ en el proyecto que se utilizara para el correcto visualizado
27
30
  ```
28
31
 
29
32
  2.- In main.ts file
@@ -42,8 +45,6 @@ app.use(FgeAuthPlugin, {
42
45
  baseUrl: string; -> URL BASE DE LOS SERVICIOS DE SEGURIDAD - https://url
43
46
  aplicacion: string; -> Identificador de la aplicacion
44
47
  rrhhUrl: string; -> url de rrhh de donde salen las fotos https://url/api
45
- redirectLoginFunction: Function; -> Funcion que redirecciona al hacer login
46
- redirectLogoutFunction: Function; -> Funcion que redirecciona al hacer logout
47
48
  API_SERVER_REDIRECT: string, -> URL DE REDIRECCION DE CIUDADANIA DIGITAL
48
49
  }
49
50
  );
@@ -57,13 +58,22 @@ app.use(FgeAuthPlugin, {
57
58
  Añadir el componente dentro de una página en blanco.
58
59
 
59
60
  ```
60
- <FgeLoginComponent />
61
+ <FgeLoginComponent @onLogin="function"/>
62
+
63
+ - El componente envia por el evento @onLogin la señal cuando se ha realizado un inicio de
64
+ sesión correcto ya sea por ciudadanía digital o el login normal.
65
+ - El componente envia el evento @onError cuando existe algun tipo de error.
61
66
  ```
62
67
 
63
68
  - FgeAuthMenuComponent
64
69
 
65
70
  Menu que contiene la información del usuario logeado y los botones de ver perfil y cerrar sesión.
66
- <FgeAuthMenuComponent />
71
+ <FgeAuthMenuComponent @onLogout="redirectOnLogout"/>
72
+
73
+ ```
74
+ - El componente envia por el evento @onLogout la señal cuando se ha realizado la
75
+ acción de cerrar sesión.
76
+ ```
67
77
 
68
78
  - useFgeAuthLoginStore
69
79
 
@@ -4,16 +4,23 @@ export interface ILoginApi {
4
4
  password: string;
5
5
  aplicacion: string;
6
6
  codigoDispositivo?: string;
7
+ verificarSiFuncionario?: boolean;
7
8
  }
8
9
  export interface I2AuthLoginApi {
9
10
  code: string;
10
11
  usuarioId: string;
11
12
  aplicacion: string;
12
13
  codigoDispositivo?: string;
14
+ verificarSiFuncionario?: boolean;
15
+ }
16
+ export interface IRefreshToken {
17
+ token: string;
18
+ refreshToken: string;
13
19
  }
14
20
  export default function useLoginApi(): {
15
21
  onLoginApi: (values: ILoginApi) => Promise<IResponse>;
16
22
  on2AuthLoginApi: (values: I2AuthLoginApi) => Promise<IResponse>;
17
23
  onLogoutApi: () => Promise<IResponse>;
18
24
  onLoginCiudadaniaApi: (values: any) => Promise<IResponse>;
25
+ onRefreshTokenApi: (values: IRefreshToken) => Promise<IResponse>;
19
26
  };
@@ -1,2 +1,5 @@
1
- declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onLogin" | "onError")[], "onLogin" | "onError", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
2
+ onOnLogin?: ((...args: any[]) => any) | undefined;
3
+ onOnError?: ((...args: any[]) => any) | undefined;
4
+ }, {}, {}>;
2
5
  export default _sfc_main;
@@ -1,2 +1,4 @@
1
- declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onLogout"[], "onLogout", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
2
+ onOnLogout?: ((...args: any[]) => any) | undefined;
3
+ }, {}, {}>;
2
4
  export default _sfc_main;
@@ -1,2 +1,5 @@
1
- declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onLogin" | "onLoginError")[], "onLogin" | "onLoginError", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
2
+ onOnLogin?: ((...args: any[]) => any) | undefined;
3
+ onOnLoginError?: ((...args: any[]) => any) | undefined;
4
+ }, {}, {}>;
2
5
  export default _sfc_main;