Code Monkey home page Code Monkey logo

akamaiopen-edgegrid-node's People

Contributors

jonathanbennett avatar ktyacke avatar mdb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

akamaiopen-edgegrid-node's Issues

Feature request: simplify authentication

In current implementation, AkamaiOPEN-edgegrid-node requires the user to call 2 methods with each request: 1) #auth 2) #send.

(Additionally, #auth accepts an undocumented & seemingly unnecessary callback -- can this be removed?)

In my mind, it would substantially simplify usage if authentication were abstracted behind #send, thus saving the user from needing to call 2 methods.

Please let me know your thoughts -- I am happy to implement this.

Thanks!

Errors when behind a proxy

AkamaiOPEN-edgegrid-node fails to perform successful HTTP requests when behind a proxy. While it's difficult to assess, I believe it may fail to properly respect the common HTTP(S)_PROXY environment variable(s).

As a proof-of-concept, I was able to address this issue with the use of the request module in place of the http module. See my request-cleanup branch for further details.

I am also happy to put together a PR & related tests addressing this issue.

AkamaiOPEN-edgegrid-node follows redirects

When an Akamai API request returns a response with a status code indicating a redirect, AkamaiOPEN-edgegrid-node automatically follows the redirect, but fails to generate a new Authorization header based on the Location. As a result, the request fails, returning a response status code of 401 ("The signature does not match").

This can be reproduced by performing a request against the PAPI latest property version endpoint:

var eg = new EdgeGrid(clientToken, clientSecret, accessToken, base);

eg.auth({
  path: '/papi/v0/properties/prp_123/versions/latest?contractId=ctr_123&groupId=grp_123&activatedOn=STAGING'
});

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.