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

edgegrid

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edgegrid

Authorisation process and API helper for Akamai OPEN APIs

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5K
increased by96.84%
Maintainers
1
Weekly downloads
 
Created
Source

EdgeGrid for Node.js

This library implements an Authentication handler for requests that provides the Akamai {OPEN} Edgegrid Authentication scheme. For more infomation visit the Akamai {OPEN} Developer Community.

@jldb

Installation

npm install --save akamai-open

Reporting a bug

To report a bug simply create a new GitHub Issue and describe your problem or suggestion.

Before reporting a bug look around to see if there are any open or closed tickets that cover your issue. And remember the wisdom: pull request > bug report > tweet!

Contributing

To contribute please feel free to create a fork and submit a pull request.

Example

To use the AkamaiOPEN API you must first register the correct user credentials. You can do that through the LUNA control panel.

Basic use of the library looks like the following. This will prepare the auth header and then execute it. Remember that requests to the API are signed with a timestamp and therefore should be executed immediately.


	var EdgeGrid = require('edgegrid');

	var client_token = "akab-access-token-xxx-xxxxxxxxxxxxxxxx",
	  client_secret = "akab-client-token-xxx-xxxxxxxxxxxxxxxx",
	  access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=";

	var data = "datadatadatadatadatadatadatadata";

	var eg = new EdgeGrid(client_token, client_secret, access_token);

	eg.auth({
	  "url": "https://akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net/billing-usage/v1/products",
	  "method": "POST",
	  "headers": {},
	  "body": data
	});

	eg.send(function (data, response) {
	  console.log(data);
	});

Calls using the edgegrid client can also be chained as per the following;

	...

	eg.auth({
	  "url": "https://akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net/billing-usage/v1/products",
	  "method": "POST",
	  "headers": {},
	  "body": data
	}).send(function (data, response) {
	  console.log(data);
	});

Keywords

FAQs

Package last updated on 22 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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