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

@dfns/sdk

Package Overview
Dependencies
Maintainers
13
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfns/sdk - npm Package Compare versions

Comparing version 0.1.0-beta.6 to 0.1.0-beta.7

2

package.json
{
"name": "@dfns/sdk",
"version": "0.1.0-beta.6",
"version": "0.1.0-beta.7",
"dependencies": {

@@ -5,0 +5,0 @@ "buffer": "6.0.3",

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

return async (resource, options) => {
var _a;
const response = await fetch(resource, options);

@@ -37,3 +38,4 @@ if (response.ok) {

const body = await response.json();
throw new dfnsError_1.DfnsError(response.status, body.error.message, body.error);
const errorMessage = ((_a = body === null || body === void 0 ? void 0 : body.error) === null || _a === void 0 ? void 0 : _a.message) || (body === null || body === void 0 ? void 0 : body.message) || JSON.stringify(body);
throw new dfnsError_1.DfnsError(response.status, errorMessage, body.error);
}

@@ -70,2 +72,6 @@ };

if (options.method !== 'GET') {
const apiOptions = {
...options.apiOptions,
baseUrl: options.apiOptions.baseAuthUrl || options.apiOptions.baseUrl,
};
const { challenge, challengeIdentifier, allowCredentials } = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({

@@ -75,10 +81,9 @@ userActionPayload: (_a = options.body) !== null && _a !== void 0 ? _a : '',

userActionHttpPath: resource.pathname,
userActionServerKind: 'Api',
}, options.apiOptions);
const { signer } = options.apiOptions;
const assertion = await signer.sign(challenge, allowCredentials);
userActionServerKind: (apiOptions === null || apiOptions === void 0 ? void 0 : apiOptions.userActionServerKind) || 'Api',
}, apiOptions);
const assertion = await apiOptions.signer.sign(challenge, allowCredentials);
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge({
challengeIdentifier,
firstFactor: assertion,
}, options.apiOptions);
}, apiOptions);
options.headers = {

@@ -85,0 +90,0 @@ 'x-dfns-useraction': userAction,

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