Socket
Socket
Sign inDemoInstall

pubnub

Package Overview
Dependencies
Maintainers
7
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pubnub - npm Package Compare versions

Comparing version 4.36.0 to 4.37.0

lib/core/endpoints/access_manager/revoke_token.js

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## v4.37.0
December 16 2021
#### Added
- Add revoke token feature.
## v4.36.0

@@ -2,0 +8,0 @@ December 09 2021

2

lib/core/components/config.js

@@ -245,3 +245,3 @@ "use strict";

value: function getVersion() {
return '4.36.0';
return '4.37.0';
}

@@ -248,0 +248,0 @@ }, {

@@ -158,3 +158,4 @@ "use strict";

case _operations["default"].PNAccessManagerGrantToken:
operation = 'pam3';
case _operations["default"].PNAccessManagerRevokeToken:
operation = 'pamv3';
break;

@@ -161,0 +162,0 @@

@@ -63,3 +63,4 @@ "use strict";

PNAccessManagerGrantToken: 'PNAccessManagerGrantToken',
PNAccessManagerAudit: 'PNAccessManagerAudit'
PNAccessManagerAudit: 'PNAccessManagerAudit',
PNAccessManagerRevokeToken: 'PNAccessManagerRevokeToken'
};

@@ -66,0 +67,0 @@ exports["default"] = _default;

@@ -156,2 +156,4 @@ "use strict";

var _revoke_token = _interopRequireDefault(require("./endpoints/access_manager/revoke_token"));
var publishEndpointConfig = _interopRequireWildcard(require("./endpoints/publish"));

@@ -214,2 +216,3 @@

(0, _defineProperty2["default"])(this, "audit", void 0);
(0, _defineProperty2["default"])(this, "revokeToken", void 0);
(0, _defineProperty2["default"])(this, "subscribe", void 0);

@@ -359,2 +362,3 @@ (0, _defineProperty2["default"])(this, "signal", void 0);

this.audit = _endpoint["default"].bind(this, modules, auditEndpointConfig);
this.revokeToken = _endpoint["default"].bind(this, modules, _revoke_token["default"]);
this.publish = _endpoint["default"].bind(this, modules, publishEndpointConfig);

@@ -361,0 +365,0 @@

{
"name": "pubnub",
"version": "4.36.0",
"version": "4.37.0",
"author": "PubNub <support@pubnub.com>",

@@ -17,7 +17,9 @@ "description": "Publish & Subscribe Real-time Messaging with PubNub",

"test:crypto:web": "karma start karma/chrome.config.js test/crypto/web.test.js",
"contract:refresh": "rimraf dist/contract && git clone --branch contract git@github.com:pubnub/service-contract-mock.git dist/contract && npm install --prefix dist/contract && npm run refresh-files --prefix dist/contract",
"contract:refresh": "rimraf dist/contract && git clone --branch master git@github.com:pubnub/service-contract-mock.git dist/contract && npm install --prefix dist/contract && npm run refresh-files --prefix dist/contract",
"contract:server": "npm start --prefix dist/contract consumer",
"contract:build": "cd test/contract && tsc",
"contract:test": "cucumber-js --require dist/cucumber dist/contract/contract/features --tags 'not @noImpl=JavaScript'",
"contract:test-access": "cucumber-js --require dist/cucumber dist/contract/contract/features --tags @feature=access"
"contract:test": "cucumber-js --require dist/cucumber dist/contract/contract/features --tags 'not @na=js and not @beta'",
"contract:test-beta": "cucumber-js --require dist/cucumber dist/contract/contract/features --tags 'not @na=js and @beta'",
"contract:test-access": "cucumber-js --require dist/cucumber dist/contract/contract/features --tags '@featureSet=access and not @na=js and not @beta'",
"contract:test-access-beta": "cucumber-js --require dist/cucumber dist/contract/contract/features --tags '@featureSet=access and not @na=js and @beta'"
},

@@ -24,0 +26,0 @@ "main": "./lib/node/index.js",

@@ -25,4 +25,4 @@ # PubNub JavaScript SDK (V4)

* or download one of our builds from our CDN:
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.36.0.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.36.0.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.37.0.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.37.0.min.js

@@ -29,0 +29,0 @@ 2. Configure your keys:

@@ -316,3 +316,3 @@ /* @flow */

getVersion(): string {
return '4.36.0';
return '4.37.0';
}

@@ -319,0 +319,0 @@

@@ -136,3 +136,4 @@ /* @flow */

case operationConstants.PNAccessManagerGrantToken:
operation = 'pam3';
case operationConstants.PNAccessManagerRevokeToken:
operation = 'pamv3';
break;

@@ -139,0 +140,0 @@ default:

@@ -86,3 +86,4 @@ /* @flow */

PNAccessManagerAudit: 'PNAccessManagerAudit',
PNAccessManagerRevokeToken: 'PNAccessManagerRevokeToken',
//
};

@@ -140,2 +140,6 @@ /** @flow */

import * as grantTokenEndpointConfig from './endpoints/access_manager/grant_token';
import revokeTokenEndpointConfig, {
type RevokeTokenParams,
type RevokeTokenResult,
} from './endpoints/access_manager/revoke_token';

@@ -192,2 +196,6 @@ import * as publishEndpointConfig from './endpoints/publish';

audit: Function;
revokeToken: (
parameters: RevokeTokenParams,
callback?: (status: CallbackStatus, result: RevokeTokenResult) => void
) => Promise<RevokeTokenResult>;
//

@@ -437,2 +445,3 @@ subscribe: Function;

this.audit = endpointCreator.bind(this, modules, auditEndpointConfig);
this.revokeToken = endpointCreator.bind(this, modules, revokeTokenEndpointConfig);
//

@@ -439,0 +448,0 @@ this.publish = endpointCreator.bind(this, modules, publishEndpointConfig);

@@ -89,3 +89,3 @@ import { Given, When, Then, Before, After } from '@cucumber/cucumber';

// console.log('not expected token', this.token)
} catch (e) {
} catch (e: any) {
// console.log('expected error', e)

@@ -163,2 +163,6 @@ this.expectedError = e?.status?.errorData;

Then('the error service is {string}', function (errorService) {
expect(this.expectedError.service).to.equal(errorService);
});
Then('the error source is {string}', function (errorSource: string) {

@@ -173,2 +177,7 @@ expect(this.expectedError.error.source).to.equal(errorSource);

Then('the error detail message is not empty', function () {
let details = this.expectedError.error.details[0];
expect(details.message).to.not.to.be.empty;
});
Then('the error detail location is {string}', function (errorLocation: string) {

@@ -175,0 +184,0 @@ let details = this.expectedError.error.details[0];

@@ -48,8 +48,6 @@ import {

},
// bronze config
// accessManagerKeyset: {
// publishKey : process.env.PUBLISH_KEY_ACCESS_BRONZE || 'pub-key',
// subscribeKey : process.env.SUBSCRIBE_KEY_ACCESS_BRONZE || 'sub-key',
// secretKey: process.env.SECRET_KEY_ACCESS_BRONZE || 'secret-key'
// },
accessManagerWithoutSecretKeyKeyset: {
publishKey : process.env.PUBLISH_KEY_ACCESS || 'pub-key',
subscribeKey : process.env.SUBSCRIBE_KEY_ACCESS || 'sub-key',
},
tokenWithKnownAuthorizedUUID: 'qEF2AkF0GmEI03xDdHRsGDxDcmVzpURjaGFuoWljaGFubmVsLTEY70NncnChb2NoYW5uZWxfZ3JvdXAtMQVDdXNyoENzcGOgRHV1aWShZnV1aWQtMRhoQ3BhdKVEY2hhbqFtXmNoYW5uZWwtXFMqJBjvQ2dycKF0XjpjaGFubmVsX2dyb3VwLVxTKiQFQ3VzcqBDc3BjoER1dWlkoWpedXVpZC1cUyokGGhEbWV0YaBEdXVpZHR0ZXN0LWF1dGhvcml6ZWQtdXVpZENzaWdYIPpU-vCe9rkpYs87YUrFNWkyNq8CVvmKwEjVinnDrJJc',

@@ -56,0 +54,0 @@ tokenWithUUIDResourcePermissions: 'qEF2AkF0GmEI03xDdHRsGDxDcmVzpURjaGFuoWljaGFubmVsLTEY70NncnChb2NoYW5uZWxfZ3JvdXAtMQVDdXNyoENzcGOgRHV1aWShZnV1aWQtMRhoQ3BhdKVEY2hhbqFtXmNoYW5uZWwtXFMqJBjvQ2dycKF0XjpjaGFubmVsX2dyb3VwLVxTKiQFQ3VzcqBDc3BjoER1dWlkoWpedXVpZC1cUyokGGhEbWV0YaBEdXVpZHR0ZXN0LWF1dGhvcml6ZWQtdXVpZENzaWdYIPpU-vCe9rkpYs87YUrFNWkyNq8CVvmKwEjVinnDrJJc',

@@ -224,3 +224,3 @@ /* global describe, beforeEach, it, before, after */

.then((lastRequest) => {
utils.verifyRequestTelemetry(lastRequest.path, 'l_pam3', average, leeway);
utils.verifyRequestTelemetry(lastRequest.path, 'l_pamv3', average, leeway);
done();

@@ -227,0 +227,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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

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