@cocreate/authenticate
Advanced tools
Comparing version 1.0.18 to 1.1.0
@@ -0,1 +1,14 @@ | ||
# [1.1.0](https://github.com/CoCreate-app/CoCreate-authenticate/compare/v1.0.18...v1.1.0) (2023-08-16) | ||
### Bug Fixes | ||
* crud attributes renamed ([626bca8](https://github.com/CoCreate-app/CoCreate-authenticate/commit/626bca8659eaa87cea1067c35ff07a28a9d2cf56)) | ||
* Refactored *-target to *-selector ([ad7247e](https://github.com/CoCreate-app/CoCreate-authenticate/commit/ad7247eecc4bb3c73a0b32841194fb2a15021cf8)) | ||
### Features | ||
* name attribute and variable renamed to key ([e695800](https://github.com/CoCreate-app/CoCreate-authenticate/commit/e695800527c17d6ce7dd7f91825a7f99408064d6)) | ||
## [1.0.18](https://github.com/CoCreate-app/CoCreate-authenticate/compare/v1.0.17...v1.0.18) (2023-06-14) | ||
@@ -2,0 +15,0 @@ |
@@ -7,4 +7,4 @@ module.exports = { | ||
{ | ||
"collection": "files", | ||
"document": { | ||
"array": "files", | ||
"object": { | ||
"_id": "6204253480b409001727b73d", | ||
@@ -11,0 +11,0 @@ "name": "index.html", |
{ | ||
"name": "@cocreate/authenticate", | ||
"version": "1.0.18", | ||
"version": "1.1.0", | ||
"description": "A simple authenticate component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.", | ||
@@ -43,5 +43,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@cocreate/uuid": "^1.4.27", | ||
"@cocreate/uuid": "^1.4.28", | ||
"jsonwebtoken": "^9.0.0" | ||
} | ||
} |
@@ -15,10 +15,10 @@ const jwt = require('jsonwebtoken'); | ||
// crud.listen('createDocument', function (data) { | ||
// if (data.document && data.document[0] && data.document[0].type === 'keyPair') | ||
// keyPairs.set(data.document[0]._id, data.document[0]); | ||
// crud.listen('create.object', function (data) { | ||
// if (data.object && data.object[0] && data.object[0].type === 'keyPair') | ||
// keyPairs.set(data.object[0]._id, data.object[0]); | ||
// }); | ||
// crud.listen('deleteDocument', function (data) { | ||
// if (data.document && data.document[0] && data.document[0].type === 'keyPair') | ||
// keyPairs.delete(data.document[0]._id); | ||
// crud.listen('delete.object', function (data) { | ||
// if (data.object && data.object[0] && data.object[0].type === 'keyPair') | ||
// keyPairs.delete(data.object[0]._id); | ||
// }); | ||
@@ -42,5 +42,6 @@ | ||
// crud.createDocument({ | ||
// collection: 'keys', | ||
// document: { | ||
// crud.send({ | ||
// method: 'create.object', | ||
// array: 'keys', | ||
// object: { | ||
// ...keyPair, | ||
@@ -56,7 +57,8 @@ // }, | ||
function readKeyPairs() { | ||
const keys = crud.readDocument({ | ||
collection: 'keys', | ||
const keys = crud.send({ | ||
method: 'read.object', | ||
array: 'keys', | ||
filter: { | ||
query: [ | ||
{ name: 'type', value: 'keyPair' }, | ||
{ key: 'type', value: 'keyPair' }, | ||
], | ||
@@ -68,4 +70,4 @@ }, | ||
// Add retrieved key pairs to the keyPairs array | ||
if (keys.document && keys.document.length) { | ||
keys.document.forEach((keyPair) => { | ||
if (keys.object && keys.object.length) { | ||
keys.object.forEach((keyPair) => { | ||
keyPairs.set(keyPair._id, keyPair); | ||
@@ -79,5 +81,6 @@ }); | ||
keyPairs.delete(keyPair._id) | ||
// crud.deleteDocument({ | ||
// collection: 'keys', | ||
// document: { | ||
// crud.send({ | ||
// method: 'delete.object', | ||
// array: 'keys', | ||
// object: { | ||
// _id: keyPair._id, | ||
@@ -84,0 +87,0 @@ // type: 'keyPair' |
Sorry, the diff of this file is not supported yet
66370
148
Updated@cocreate/uuid@^1.4.28