🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

svelte-session-manager

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-session-manager - npm Package Compare versions

Comparing version

to
1.0.3

22

package.json
{
"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 @@ [![Build Status](https://secure.travis-ci.org/arlac77/svelte-session-manager.png)](http://travis-ci.org/arlac77/svelte-session-manager)

[![Coverage Status](https://coveralls.io/repos/arlac77/svelte-session-manager/badge.svg)](https://coveralls.io/r/arlac77/svelte-session-manager)
[![Dependency Status](https://david-dm.org/arlac77/svelte-session-manager.svg)](https://david-dm.org/arlac77/svelte-session-manager)
[![devDependency Status](https://david-dm.org/arlac77/svelte-session-manager/dev-status.svg)](https://david-dm.org/arlac77/svelte-session-manager#info=devDependencies)
[![docs](http://inch-ci.org/github/arlac77/svelte-session-manager.svg?branch=master)](http://inch-ci.org/github/arlac77/svelte-session-manager)
[![downloads](http://img.shields.io/npm/dm/svelte-session-manager.svg?style=flat-square)](https://npmjs.org/package/svelte-session-manager)

@@ -17,2 +14,3 @@ [![GitHub Issues](https://img.shields.io/github/issues/arlac77/svelte-session-manager.svg?style=flat-square)](https://github.com/arlac77/svelte-session-manager/issues)

[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Svelte v3](https://img.shields.io/badge/svelte-v3-orange.svg)](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