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

@nebula.js/cli-create

Package Overview
Dependencies
Maintainers
7
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nebula.js/cli-create - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

templates/mashup/src/Authenticator.js

4

package.json
{
"name": "@nebula.js/cli-create",
"version": "3.0.3",
"version": "3.0.4",
"description": "",

@@ -30,3 +30,3 @@ "license": "MIT",

},
"gitHead": "2beefab5a936527fe5cdd20b98784d72199327fb"
"gitHead": "419f994f8f5e15235fa20057bc9085b03a9a904b"
}

@@ -16,3 +16,3 @@ {

"@nebula.js/sn-bar-chart": "^1.x",
"@qlik/sdk": "^0.9.1",
"@qlik/sdk": "^0.10.2",
"enigma.js": "^2.6.3",

@@ -19,0 +19,0 @@ "parcel": "^2.3.2"

@@ -1,24 +0,26 @@

import enigma from 'enigma.js';
import schema from 'enigma.js/schemas/12.936.0.json';
import { Auth, AuthType } from '@qlik/sdk';
import { AuthType } from '@qlik/sdk';
import Authenticator from './Authenticator';
async function connect({ url, webIntegrationId, appId }) {
const authInstance = new Auth({
webIntegrationId,
autoRedirect: true,
authType: AuthType.WebIntegration,
host: url.replace(/^https?:\/\//, '').replace(/\/?/, ''),
async function connect({ connectionType, url, appId, ...rest }) {
const AuthenticatorInstance = new Authenticator({
url,
appId,
});
if (!authInstance.isAuthenticated()) {
authInstance.authenticate();
} else {
const wssUrl = await authInstance.generateWebsocketUrl(appId);
const enigmaGlobal = await enigma.create({ schema, url: wssUrl }).open();
return enigmaGlobal.openDoc(appId);
switch (connectionType) {
case AuthType.WebIntegration: {
return AuthenticatorInstance.AuthenticateWithWebIntegrationId({
...rest,
});
}
case AuthType.OAuth2: {
return AuthenticatorInstance.AuthenticateWithOAuth({ ...rest });
}
default:
throw new Error('Please Provide a `connectionType` to proceed!');
}
return null;
}
export default connect;
/* eslint-disable */
import { AuthType } from '@qlik/sdk';
import embed from './configure';

@@ -7,5 +8,10 @@ import connect from './connect';

const app = await connect({
connectionType: '<AuthType.SOME_CONNECTION_TYPE>',
url: '<URL>',
appId: '<App id>',
// you should use only one of below keys
// based on your `connectionType`
clientId: '<Qlik OAuth client id>',
webIntegrationId: '<Qlik web integration id>',
appId: '<App id>',
});

@@ -12,0 +18,0 @@

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