@dsb-norge/vue-keycloak-js
Advanced tools
Comparing version 1.0.9 to 1.1.0
{ | ||
"name": "@dsb-norge/vue-keycloak-js", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"author": "Nils Lien <nils.lien@gmail.com>", | ||
@@ -26,8 +26,8 @@ "description": "A Keycloak plugin for Vue >= 2.x", | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-preset-env": "^1.6.1", | ||
"rollup": "^0.50.0", | ||
"rollup-plugin-babel": "^3.0.2", | ||
"rollup-plugin-commonjs": "^8.2.4", | ||
"rollup-plugin-node-resolve": "^3.0.0" | ||
"@babel/core": "^7.4.3", | ||
"@babel/preset-env": "^7.4.3", | ||
"rollup": "^1.9.0", | ||
"rollup-plugin-babel": "^4.3.2", | ||
"rollup-plugin-commonjs": "^9.3.4", | ||
"rollup-plugin-node-resolve": "^4.1.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "scripts": { |
@@ -74,3 +74,4 @@ vue-keycloak plugin | ||
hasResourceRole: Function, // Keycloak hasResourceRole function | ||
token: String // Access token | ||
token: String, // The base64 encoded token that can be sent in the Authorization header in requests to services | ||
tokenParsed: String // The parsed token as a JavaScript object | ||
} | ||
@@ -87,2 +88,3 @@ ``` | ||
|`init`|Object|`{onLoad: 'login-required'}` | ||
|`logout`|Object| | ||
|`onReady`|Function(keycloak)| | ||
@@ -92,4 +94,26 @@ | ||
**String** | ||
**IMPORTANT NOTE** | ||
Currently, the plugin accepts a config object like this: | ||
``` | ||
{ | ||
authRealm: String, | ||
authUrl: String, | ||
authClientId: String, | ||
logoutRedirectUri: String | ||
} | ||
``` | ||
**This will be deprecated in the next major release.** | ||
Thereafter, the config object, either returned from an endpoint (string) or | ||
set directly (object), must be compatible with the Keycloak JS adapter constructor arguments. | ||
The `logoutRedirectUri` must instead be defined in [`options.logout`](#logout) | ||
See description below. | ||
#### String | ||
If this option is a string, the plugin will treat it as an URL and make an HTTP GET request to it. | ||
@@ -102,10 +126,14 @@ | ||
The plugin then expects the return value to be an object with the following keys and values: | ||
The return value from the request is used as constructor parameters for the Keycloak adapter. | ||
As such, it should be an object with valid keys/values. | ||
[See Keycloak's Javascript adapter reference](https://www.keycloak.org/docs/latest/securing_apps/index.html#javascript-adapter-reference) | ||
E.g. | ||
``` | ||
{ | ||
authRealm: String, | ||
authUrl: String, | ||
authClientId: String, | ||
logoutRedirectUri: String | ||
realm: String, | ||
url: String, | ||
clientId: String | ||
} | ||
@@ -116,6 +144,6 @@ ``` | ||
**Object** | ||
#### Object | ||
If this option is an object, the values will be passed as constructor parameters. The keys must have the same naming | ||
as above. No HTTP GET request is done in this case. | ||
If this option is an object, it will be passed on as constructor parameters for the [Keycloak adapter](https://www.keycloak.org/docs/latest/securing_apps/index.html#javascript-adapter-reference). | ||
No HTTP GET request is done in this case. | ||
@@ -126,2 +154,6 @@ ### init | ||
### logout | ||
This option is the parameter object for the `Keycloak.logout` method. | ||
### onReady | ||
@@ -128,0 +160,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
215340
0
4705
215