svelte-session-manager
Advanced tools
Comparing version
{ | ||
"name": "svelte-session-manager", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"module": "src/index.mjs", | ||
@@ -12,2 +12,3 @@ "svelte": "src/index.svelte", | ||
], | ||
"license": "BSD-2-Clause", | ||
"scripts": { | ||
@@ -20,14 +21,14 @@ "docs": "documentation readme src/index.mjs --section=API", | ||
"devDependencies": { | ||
"documentation": "^12.1.2", | ||
"documentation": "^12.1.4", | ||
"jsonwebtoken": "^8.5.1", | ||
"rollup": "^1.23.1", | ||
"rollup-plugin-dev": "1.0.0", | ||
"rollup": "^1.27.10", | ||
"rollup-plugin-dev": "^1.1.1", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-svelte": "^5.1.0", | ||
"semantic-release": "^15.13.25", | ||
"svelte": "^3.12.1", | ||
"testcafe": "^1.5.0" | ||
"rollup-plugin-svelte": "^5.1.1", | ||
"semantic-release": "^15.13.31", | ||
"svelte": "^3.16.4", | ||
"testcafe": "^1.7.0" | ||
}, | ||
"engines": { | ||
"node": ">=12.11.1" | ||
"node": ">=12.13.1" | ||
}, | ||
@@ -42,5 +43,2 @@ "repository": { | ||
"homepage": "https://github.com/arlac77/svelte-session-manager#readme", | ||
"config": { | ||
"port": 5000 | ||
}, | ||
"template": { | ||
@@ -47,0 +45,0 @@ "repository": { |
@@ -5,5 +5,2 @@ [](http://travis-ci.org/arlac77/svelte-session-manager) | ||
[](https://coveralls.io/r/arlac77/svelte-session-manager) | ||
[](https://david-dm.org/arlac77/svelte-session-manager) | ||
[](https://david-dm.org/arlac77/svelte-session-manager#info=devDependencies) | ||
[](http://inch-ci.org/github/arlac77/svelte-session-manager) | ||
[](https://npmjs.org/package/svelte-session-manager) | ||
@@ -17,2 +14,3 @@ [](https://github.com/arlac77/svelte-session-manager/issues) | ||
[](https://github.com/prettier/prettier) | ||
[](https://svelte.dev) | ||
@@ -29,3 +27,3 @@ # svelte-session-manager | ||
// use localStorage as backng store | ||
// use localStorage as backing store | ||
let session = new Session(localStorage); | ||
@@ -38,3 +36,3 @@ | ||
session.isValid; // true when auth was ok | ||
session.isValid; // true when auth was ok or localStorage token is still valid | ||
@@ -56,3 +54,3 @@ | ||
} | ||
); | ||
,[]); | ||
@@ -109,2 +107,8 @@ // $values contains fetch result as long as session has not expired | ||
or session storage | ||
```js | ||
let session = new Session(sessionStorage); | ||
``` | ||
### Parameters | ||
@@ -117,2 +121,3 @@ | ||
- `entitlements` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** | ||
- `subscriptions` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** store subscriptions | ||
- `expirationDate` **[Date](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)** | ||
@@ -129,2 +134,6 @@ - `store` **[SessionData](#sessiondata)** backing store to use for save same as data param | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** header The http header. | ||
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** header.Authorization The Bearer access token. | ||
### isValid | ||
@@ -150,4 +159,5 @@ | ||
Bring session into the valid state by callinf the authorization endpoint | ||
and asking for a access_token | ||
Bring session into the valid state by calling the authorization endpoint | ||
and asking for a access_token. | ||
Executess a POST on the endpoint url providing username, and password as json | ||
@@ -154,0 +164,0 @@ ### Parameters |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15746
4.49%181
4.62%173
6.13%