Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonld-signatures

Package Overview
Dependencies
Maintainers
0
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonld-signatures - npm Package Compare versions

Comparing version 11.3.2 to 11.4.0

17

lib/purposes/AuthenticationProofPurpose.js

@@ -28,3 +28,4 @@ /*!

if(proof.challenge !== this.challenge) {
throw new Error('The challenge is not as expected; ' +
throw new Error(
'The challenge is not as expected; ' +
`challenge="${proof.challenge}", expected="${this.challenge}"`);

@@ -34,5 +35,13 @@ }

// check domain
if(this.domain !== undefined && proof.domain !== this.domain) {
throw new Error('The domain is not as expected; ' +
`domain="${proof.domain}", expected="${this.domain}"`);
if(this.domain !== undefined) {
// `proof.domain` must equal `this.domain` OR if `proof.domain` is
// an array, the array must include `this.domain` as an element
const {domain} = proof;
if(!(domain === this.domain ||
(Array.isArray(domain) && domain.includes(this.domain)))) {
throw new Error(
'The domain is not as expected; ' +
`domain=${JSON.stringify(domain)}, ` +
`expected=${JSON.stringify(this.domain)}`);
}
}

@@ -39,0 +48,0 @@

{
"name": "jsonld-signatures",
"version": "11.3.2",
"version": "11.4.0",
"description": "An implementation of the Linked Data Signatures specifications for JSON-LD in JavaScript.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/digitalbazaar/jsonld-signatures",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc