@luizleon/sf.prefeiturasp.vuecomponents 0.0.61 → 0.0.63
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/dist/services/authService.d.ts +7 -1
- package/dist/sf.prefeiturasp.vuecomponents.es.js +145 -142
- package/dist/sf.prefeiturasp.vuecomponents.es.js.map +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.js +6 -6
- package/dist/sf.prefeiturasp.vuecomponents.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/services/authService.ts +15 -3
package/package.json
CHANGED
|
@@ -23,7 +23,13 @@ async function CheckSilentLoginFile() {
|
|
|
23
23
|
return result;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
let AuthService: IAuthService;
|
|
27
|
+
|
|
28
|
+
function ConfigAuthService(config?: KeycloakConfig): IAuthService {
|
|
29
|
+
if (!config) {
|
|
30
|
+
return AuthService;
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
const keycloakInstance = new Keycloak(config);
|
|
28
34
|
|
|
29
35
|
const User: User = {} as User;
|
|
@@ -93,7 +99,13 @@ function AuthService(config: KeycloakConfig): IAuthService {
|
|
|
93
99
|
};
|
|
94
100
|
}
|
|
95
101
|
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Serviço de autenticação.
|
|
104
|
+
* O parâmetro config só deve ser passado uma única vez, no início da aplicação.
|
|
105
|
+
* @param config
|
|
106
|
+
* @returns
|
|
107
|
+
*/
|
|
108
|
+
const UseAuthService = (config?: KeycloakConfig) =>
|
|
109
|
+
ConfigAuthService(config);
|
|
98
110
|
|
|
99
111
|
export { UseAuthService };
|