@samhammer/authentication-vue 2.0.5 → 2.0.7

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,4 +1,6 @@
1
+ import type { KeycloakInitOptions } from "keycloak-js";
1
2
  export interface AuthOptions {
3
+ keycloakInitOptions?: KeycloakInitOptions;
2
4
  apiClientId?: string;
3
5
  appClientId?: string;
4
6
  guestClientId?: string;
package/lib/AuthPlugin.js CHANGED
@@ -101,6 +101,7 @@ class KeycloakPlugin {
101
101
  });
102
102
  this.pluginState = {
103
103
  keycloak: keycloak,
104
+ authOptios: authOptions,
104
105
  accessTokenKey: `${authOptions.appClientId}-accessToken`,
105
106
  refreshTokenKey: `${authOptions.appClientId}-refreshToken`,
106
107
  idTokenKey: `${authOptions.appClientId}-idToken`
@@ -125,7 +126,8 @@ class KeycloakPlugin {
125
126
  enableLogging: false,
126
127
  refreshToken: LocalStorageUtils.getItem(this.pluginState.refreshTokenKey),
127
128
  token: LocalStorageUtils.getItem(this.pluginState.accessTokenKey),
128
- idToken: LocalStorageUtils.getItem(this.pluginState.idTokenKey)
129
+ idToken: LocalStorageUtils.getItem(this.pluginState.idTokenKey),
130
+ ...this.pluginState.authOptios.keycloakInitOptions
129
131
  });
130
132
  if (authenticated) {
131
133
  console.debug("authenticated keycloak");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samhammer/authentication-vue",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "Keycloak authentication for VueJS projects",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",