@moreillon/vue-oidc 0.0.8 → 0.0.9
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type OidcClient from "@moreillon/oidc-auth";
|
|
2
|
-
declare function login():
|
|
3
|
-
declare function logout():
|
|
2
|
+
declare function login(): void;
|
|
3
|
+
declare function logout(): void;
|
|
4
4
|
export default function (): {
|
|
5
5
|
client: import("vue").Ref<{
|
|
6
6
|
cookieName: string;
|
|
@@ -5,12 +5,12 @@ const access_token = ref(null);
|
|
|
5
5
|
function login() {
|
|
6
6
|
if (!client.value)
|
|
7
7
|
throw new Error("OIDC Client not instanciated");
|
|
8
|
-
|
|
8
|
+
client.value.login();
|
|
9
9
|
}
|
|
10
10
|
function logout() {
|
|
11
11
|
if (!client.value)
|
|
12
12
|
throw new Error("OIDC Client not instanciated");
|
|
13
|
-
|
|
13
|
+
client.value.logout();
|
|
14
14
|
}
|
|
15
15
|
export default function () {
|
|
16
16
|
return {
|