New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@windingtree/org.id-auth

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@windingtree/org.id-auth - npm Package Compare versions

Comparing version 1.0.0-beta.27 to 1.0.0-beta.28

dist/utils.d.ts

45

dist/keys.js

@@ -9,6 +9,3 @@ "use strict";

'EcdsaSecp256k1VerificationKey2019',
'Ed25519VerificationKey2018',
'RsaVerificationKey2018',
'X25519KeyAgreementKey2019',
'EcdsaSecp256k1RecoveryMethod2020',
'JsonWebKey2020'
];

@@ -20,20 +17,9 @@ exports.keyTypeConfig = {

jws: true,
crv: 'secp256k1',
},
'Ed25519VerificationKey2018': {
alg: 'EdDSA',
type: 'ed25519',
'JsonWebKey2020': {
alg: 'ES256',
type: 'ec',
jws: true,
crv: 'Ed25519',
},
'RsaVerificationKey2018': {
alg: 'RSA-OAEP',
type: 'rsa',
jws: false,
modulusLength: 2048,
},
'X25519KeyAgreementKey2019': {
alg: 'ECDH-ES+A256KW',
type: 'x25519',
jws: false,
crv: 'X25519',
crv: 'P-256'
}

@@ -43,10 +29,7 @@ };

'secp256k1': 'EcdsaSecp256k1VerificationKey2019',
'Ed25519': 'Ed25519VerificationKey2018',
'RSA': 'RsaVerificationKey2018',
'X25519': 'X25519KeyAgreementKey2019',
'P-256': 'JsonWebKey2020'
};
exports.signatureTypeMap = {
'secp256k1': 'EcdsaSecp256k1Signature2019',
'Ed25519': 'Ed25519Signature2018',
'RSA': 'RsaSignature2018',
'P-256': 'JsonWebSignature2020'
};

@@ -61,3 +44,2 @@ // Get a key type from the JWK

case 'ec':
case 'okp':
if (!key.crv) {

@@ -68,5 +50,2 @@ throw new Error('Broken JWK: key curve type not found');

break;
case 'rsa':
keyType = exports.keyTypeMap['RSA'];
break;
default:

@@ -87,3 +66,2 @@ }

case 'ec':
case 'okp':
if (!key.crv) {

@@ -94,5 +72,2 @@ throw new Error('Broken JWK: key curve type not found');

break;
case 'rsa':
signatureType = exports.signatureTypeMap['RSA'];
break;
default:

@@ -114,3 +89,2 @@ }

case 'ec':
case 'okp':
if (!key.crv) {

@@ -121,5 +95,2 @@ throw new Error('Broken JWK: key curve type not found');

break;
case 'rsa':
keyConfig = exports.keyTypeConfig[exports.keyTypeMap['RSA']];
break;
default:

@@ -126,0 +97,0 @@ }

@@ -7,2 +7,3 @@ "use strict";

const org_json_schema_1 = require("@windingtree/org.json-schema");
const utils_1 = require("./utils");
const luxon_1 = require("luxon");

@@ -13,3 +14,2 @@ const jose_1 = require("jose");

const jose_4 = require("jose");
const jose_5 = require("jose");
const ethers_1 = require("ethers");

@@ -31,7 +31,7 @@ exports.CredentialSubjectTypesMap = {

// Prepare an unsigned data for signing
const buildUnsignedDataForSignature = (verificationMethod, payload) => `${jose_5.base64url.encode(JSON.stringify({
alg: 'ES256K',
const buildUnsignedDataForSignature = (verificationMethod, payload) => `${utils_1.base64url.encode(JSON.stringify({
alg: 'ES256',
kid: verificationMethod,
typ: 'JWT'
}))}.${jose_5.base64url.encode(typeof payload === 'object'
}))}.${utils_1.base64url.encode(typeof payload === 'object'
? JSON.stringify(payload)

@@ -60,3 +60,3 @@ : payload)}`;

});
return `${unsignedData}.${jose_5.base64url.encode(signature)}`;
return `${unsignedData}.${utils_1.base64url.encode(signature)}`;
};

@@ -94,3 +94,3 @@ exports.signWithSigner = signWithSigner;

try {
payload = JSON.parse(jose_5.base64url.decode(encodedPayload).toString());
payload = JSON.parse(utils_1.base64url.decode(encodedPayload).toString());
}

@@ -103,3 +103,3 @@ catch (error) {

payload,
signature: jose_5.base64url.decode(signature).toString(),
signature: utils_1.base64url.decode(signature).toString(),
message: `${encodedProtectedHeader}.${encodedPayload}`

@@ -106,0 +106,0 @@ };

{
"name": "@windingtree/org.id-auth",
"version": "1.0.0-beta.27",
"version": "1.0.0-beta.28",
"description": "ORGiD authentication library",

@@ -16,6 +16,8 @@ "main": "dist/index.js",

"lint:fix": "npx eslint . --ext .ts --fix",
"build": "rm -rf dist && npx tsc -p tsconfig-build.json",
"build": "rm -rf dist && npx tsc -p tsconfig-build.json && yarn build:docs",
"build:docs": "rm -rf docs/generated && npx typedoc --plugin typedoc-plugin-markdown --readme none --out docs/generated src/index.ts",
"test": "npx hardhat test",
"test:coverage": "npx nyc --reporter=html --reporter=lcov hardhat test"
"test:mocha": "npx mocha -r ts-node/register ./test/**/*spec.ts",
"test:coverage": "npx nyc --reporter=html --reporter=lcov npx mocha -r ts-node/register ./test/**/*spec.ts",
"test:karma": "npx karma start",
"test": "yarn test:mocha && yarn test:karma"
},

@@ -44,27 +46,40 @@ "repository": {

"@windingtree/org.id-utils": "^1.0.0-beta.26",
"@windingtree/org.json-schema": "1.0.0-beta.5",
"ethers": "5.5.1",
"jose": "4.3.6",
"@windingtree/org.json-schema": "1.0.0-beta.8",
"ethers": "5.5.2",
"jose": "4.3.7",
"luxon": "2.1.1"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "1.0.1",
"@nomiclabs/hardhat-ethers": "2.0.2",
"@babel/plugin-transform-runtime": "7.16.4",
"@babel/preset-env": "7.16.4",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@nomiclabs/hardhat-ethers": "2.0.3",
"@types/chai": "4.2.22",
"@types/chai-as-promised": "7.1.4",
"@types/karma": "6.3.1",
"@types/karma-chai": "0.1.2",
"@types/karma-chrome-launcher": "3.1.1",
"@types/karma-mocha": "1.3.1",
"@types/luxon": "2.0.7",
"@types/mocha": "9.0.0",
"@typescript-eslint/eslint-plugin": "5.4.0",
"@typescript-eslint/parser": "5.4.0",
"@typescript-eslint/eslint-plugin": "5.5.0",
"@typescript-eslint/parser": "5.5.0",
"chai": "4.3.4",
"chai-as-promised": "7.1.1",
"eslint": "8.2.0",
"hardhat": "2.6.8",
"eslint": "8.4.0",
"karma": "6.3.9",
"karma-chai": "0.1.0",
"karma-chrome-launcher": "3.1.0",
"karma-firefox-launcher": "2.1.2",
"karma-mocha": "2.0.1",
"karma-typescript": "5.5.2",
"karma-typescript-es6-transform": "5.5.2",
"mocha": "9.1.3",
"nyc": "15.1.0",
"ts-node": "10.4.0",
"typedoc": "0.22.9",
"typedoc-plugin-markdown": "3.11.6",
"typedoc": "0.22.10",
"typedoc-plugin-markdown": "3.11.7",
"typescript": "4.4.4"
},
"gitHead": "9a9f42b10b35f0a5f220b741121ef79eabc3199c"
"gitHead": "03f841d31cc7b9c1a8364e7ba3d75a3914b9c623"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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