cookie-jwt-crypto-sveltekit
Advanced tools
Comparing version 0.0.3 to 0.0.4
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
@@ -8,3 +24,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
const jwt_service_1 = require("./jwt-service"); | ||
const cookie_1 = __importDefault(require("cookie")); | ||
const COOKIE = __importStar(require("cookie")); | ||
/** | ||
@@ -20,3 +36,2 @@ * class qui implementer des fonctions pour | ||
super(expire, secret); // appelle JwtWoo et lui passe les paramettres | ||
this.cookie = cookie_1.default; | ||
/** | ||
@@ -59,4 +74,5 @@ * fonction qui creer un set-cookie pour le headers | ||
this.expire = expire; // date d'expiration du cookie mais également du jwt | ||
this.cookie = COOKIE; | ||
} | ||
} | ||
exports.CookieWoo = CookieWoo; |
@@ -14,3 +14,2 @@ "use strict"; | ||
constructor(secret) { | ||
this.crypto = crypto_js_1.default; | ||
/** | ||
@@ -45,4 +44,5 @@ * fonction qui hash la string passé en argument | ||
this.secret = secret; | ||
this.crypto = CryptoJS; | ||
} | ||
} | ||
exports.CryptoWoo = CryptoWoo; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.JwtWoo = void 0; | ||
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken")); | ||
const JWT = __importStar(require("jsonwebtoken")); | ||
/** | ||
@@ -14,3 +30,2 @@ * class qui implemente des fonctions | ||
constructor(expire, secret) { | ||
this.jwt = jsonwebtoken_1.default; | ||
/** | ||
@@ -42,4 +57,5 @@ * creation d'un token signé | ||
this.expire = expire; | ||
this.jwt = JWT; | ||
} | ||
} | ||
exports.JwtWoo = JwtWoo; |
import { JwtWoo } from './jwt-service'; | ||
import cookie from 'cookie'; | ||
import * as COOKIE from 'cookie'; | ||
/** | ||
@@ -13,3 +13,2 @@ * class qui implementer des fonctions pour | ||
super(expire, secret); // appelle JwtWoo et lui passe les paramettres | ||
this.cookie = cookie; | ||
/** | ||
@@ -52,3 +51,4 @@ * fonction qui creer un set-cookie pour le headers | ||
this.expire = expire; // date d'expiration du cookie mais également du jwt | ||
this.cookie = COOKIE; | ||
} | ||
} |
@@ -8,3 +8,2 @@ import CryptoJs from 'crypto-js'; | ||
constructor(secret) { | ||
this.crypto = CryptoJs; | ||
/** | ||
@@ -39,3 +38,4 @@ * fonction qui hash la string passé en argument | ||
this.secret = secret; | ||
this.crypto = CryptoJS; | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import jwt from 'jsonwebtoken'; | ||
import * as JWT from 'jsonwebtoken'; | ||
/** | ||
@@ -8,3 +8,2 @@ * class qui implemente des fonctions | ||
constructor(expire, secret) { | ||
this.jwt = jwt; | ||
/** | ||
@@ -36,3 +35,4 @@ * creation d'un token signé | ||
this.expire = expire; | ||
this.jwt = JWT; | ||
} | ||
} |
{ | ||
"name": "cookie-jwt-crypto-sveltekit", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "fonction de creation d'un jwt + d'un cookie (affectation httponly) + authorization graphcms dans le header, le tout fonctionnant dans le hooks de sveltekit + crypto pour les hash de mot de passe", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42731
781