@luizleon/sf.prefeiturasp.vuecomponents 0.0.59 → 0.0.60
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/package.json
CHANGED
|
@@ -16,6 +16,16 @@ interface User {
|
|
|
16
16
|
IsInRole: (role: string) => boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
interface IAuthService {
|
|
20
|
+
Instance: Keycloak;
|
|
21
|
+
User: User;
|
|
22
|
+
Init: (
|
|
23
|
+
initOptions?: KeycloakInitOptions,
|
|
24
|
+
callback?: () => void
|
|
25
|
+
) => Promise<void>;
|
|
26
|
+
Logout: () => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
19
29
|
async function CheckSilentLoginFile() {
|
|
20
30
|
const fileName = "silent-login.html";
|
|
21
31
|
const result = await fetch(location.origin + "/" + fileName)
|
|
@@ -35,7 +45,7 @@ async function CheckSilentLoginFile() {
|
|
|
35
45
|
return result;
|
|
36
46
|
}
|
|
37
47
|
|
|
38
|
-
function AuthService(config: KeycloakConfig) {
|
|
48
|
+
function AuthService(config: KeycloakConfig): IAuthService {
|
|
39
49
|
const keycloakInstance = new Keycloak(config);
|
|
40
50
|
|
|
41
51
|
const User: User = {} as User;
|