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

apigee-access

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apigee-access - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

lib/keyvaluemap.js

16

lib/index.js

@@ -225,2 +225,18 @@ /*

// kvm
module.exports.getKeyValueMap = function(name, scope, api, revision) {
if (scope === 'api' && api === null) {
throw new Error(util.format('Must specify api for api scope'));
} if ( scope === 'revision') {
if (api === null) {
throw new Error(util.format('Must specify api for revision scope'));
} else if (revision === null) {
throw new Error(util.format('Must specify revision for api revision scope'));
}
} else if (scope === 'organization' || scope === 'environment' || scope === 'api' || scope === 'revision') {
return require('./keyvaluemap').getKeyValueMap(name, scope, api, revision);
}
}
// Quota

@@ -227,0 +243,0 @@

2

package.json
{
"name": "apigee-access",
"version": "1.3.0",
"version": "1.4.0",
"description": "Provides access to Apigee-specific functionality",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,3 +7,3 @@ # apigee-access

* Access and modify "flow variables" within the Apigee message context.
* Retrieve sensitive data from the the secure store.
* Retrieve sensitive data from the the secure store (AKA "vault").
* Use the built-in distributed cache.

@@ -35,5 +35,5 @@ * Use the built-in distributed quota service.

configuration of an API proxy with Node.js code.
* When you are an Apigee Edge user who wants to take advantage of the built-in
distributed cache, quota, OAuth, and analytics available on the platform.
* If you wish to use Apigee Edge's secure storage Vaults ([more info](http://apigee.com/docs/api-services/content/using-secure-store)).

@@ -465,3 +465,3 @@ ### When Should I Not Use This?

The above API may also be invokoed on the "environment" path. In that case,
The above API may also be invoked on the "environment" path. In that case,
the data is qualified by environment. This way, at runtime different

@@ -504,3 +504,3 @@ values may be stored depending on where the Node.js script is running:

### Example
### Example 1 (simple case)

@@ -512,3 +512,25 @@ var apigee = require('apigee-access');

});
### Example 2 (retrieve a token from vault when running on Edge or pass via command line when working locally)
```
var apigee = require('apigee-access');
var token = "";
if (apigee.getMode() === 'apigee') { // test to see if running on Edge
var orgVault = apigee.getVault('gitlab', 'organization');
orgVault.get('token', function(err, secretValue) {
if (err) {
console.log(err);
next(err);
} else {
token = secretValue;
}
});
} else {
if (process.argv[2]) { // if local, grab from token command line arguments
token = process.argv[2];
}
}
```
## Using the Quota Service

@@ -515,0 +537,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