Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@did-connect/storage
Advanced tools
Defines the interface for DID Connect Session Storage, basic APIs that a session storage includes:
async create(session, attrs)
, create a new session record, persist in storageasync read(session)
, read a session from storage,async update(session, updates)
, update session recordasync delete(session)
, remove a session recordnpm install @did-connect/storage
// or
yarn add @did-connect/storage
const { BaseStorage } = require('@did-connect/storage');
const keystone = require('keystone');
module.exports = class KeystoneStorage extends BaseStorage {
constructor() {
this.model = keystone.list('sessions').model;
}
create(sessionId, attrs) {
const LoginToken = this.model;
const item = new LoginToken({ sessionId, ...attrs });
return item.save();
}
read(sessionId) {
return this.model.findOne({ sessionId });
}
update(sessionId, updates) {
return this.model.findOneAndUpdate({ sessionId }, updates);
}
delete(sessionId) {
return this.model.remove({ sessionId });
}
};
FAQs
Storage interface for did-auth
The npm package @did-connect/storage receives a total of 648 weekly downloads. As such, @did-connect/storage popularity was classified as not popular.
We found that @did-connect/storage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.