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

@metrichor/epi2me-client-web

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metrichor/epi2me-client-web - npm Package Compare versions

Comparing version 0.1.10209158 to 0.1.10211367

common/jwt.d.ts

2

common/restricted_fetch.type.d.ts

@@ -11,3 +11,3 @@ import type { Dictionary } from 'ts-runtime-typecheck';

};
export type RestrictedFetch = (url: string, info?: RestrictedRequestInfo) => Promise<RestrictedResponse>;
export type RestrictedFetch = (url: string, info: RestrictedRequestInfo) => Promise<RestrictedResponse>;
//# sourceMappingURL=restricted_fetch.type.d.ts.map

@@ -220,2 +220,15 @@ 'use strict';

async function session_jwt_common(fetcher, endpoint = DEFAULT_ENDPOINT) {
const uri = new URL('validate', resolve_endpoint(endpoint));
const res = await fetcher(uri.toString(), { method: 'POST' });
if (!res.ok) {
throw new Error(res.statusText);
}
const data = await res.json();
if (!data.valid || typeof data.jwt !== 'string') {
throw new Error('Invalid credentials');
}
return data.jwt;
}
const SIGNATURE_ALGO = { name: 'HMAC', hash: { name: 'SHA-1' } };

@@ -253,2 +266,5 @@ const TEXT_ENCODER = new TextEncoder();

}
function session_jwt(options) {
return session_jwt_common((uri, info) => authenticated_fetch(uri, info, options), options.endpoint);
}

@@ -279,1 +295,2 @@ Object.defineProperty(exports, 'ApolloError', {

exports.resolve_endpoint = resolve_endpoint;
exports.session_jwt = session_jwt;
{
"name": "@metrichor/epi2me-client-web",
"version": "0.1.10209158",
"version": "0.1.10211367",
"license": "MPL-2.0",

@@ -5,0 +5,0 @@ "author": "Metrichor <support@nanoporetech.com>",

@@ -9,2 +9,3 @@ import { ApolloClient } from '@apollo/client/core';

export declare function authenticated_fetch(info: RequestInfo, init: RequestInit, options: WebClientOptions): Promise<Response>;
export declare function session_jwt(options: WebClientOptions): Promise<string>;
export { parse_key } from './parse_key';

@@ -11,0 +12,0 @@ export * from '../common/index';

Sorry, the diff of this file is not supported yet

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