fge-auth-component 0.4.2 → 1.0.0

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
@@ -42,9 +42,8 @@ app.use(FgeAuthPlugin, {
42
42
  baseUrl: string; -> URL BASE DE LOS SERVICIOS DE SEGURIDAD - https://url
43
43
  aplicacion: string; -> Identificador de la aplicacion
44
44
  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
45
  API_SERVER_REDIRECT: string, -> URL DE REDIRECCION DE CIUDADANIA DIGITAL
46
+ verificarSiFuncionario?: boolean, -> Sirve para verificar si el usuario debe ser funcionario en el sistema de rrhh
48
47
  }
49
48
  );
50
49
 
@@ -57,14 +56,21 @@ app.use(FgeAuthPlugin, {
57
56
  Añadir el componente dentro de una página en blanco.
58
57
 
59
58
  ```
60
- <FgeLoginComponent />
59
+ <FgeLoginComponent @onLogin="function"/>
60
+
61
+ - El componente envia por el evento @onLogin la señal cuando se ha realizado un inicio de
62
+ sesión correcto ya sea por ciudadanía digital o el login normal.
63
+ - El componente envia el evento @onError cuando existe algun tipo de error.
61
64
  ```
62
65
 
63
66
  - FgeAuthMenuComponent
64
67
 
65
68
  Menu que contiene la información del usuario logeado y los botones de ver perfil y cerrar sesión.
66
- <FgeAuthMenuComponent />
67
-
69
+ <FgeAuthMenuComponent @onLogout="redirectOnLogout"/>
70
+ ```
71
+ - El componente envia por el evento @onLogout la señal cuando se ha realizado la
72
+ acción de cerrar sesión.
73
+ ```
68
74
  - useFgeAuthLoginStore
69
75
 
70
76
  El store de pinia que contiene toda la información del usuario logueado
@@ -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;