Git Product home page Git Product logo

adobe-fetch's People

Contributors

dependabot[bot] avatar filmaj avatar greenkeeper[bot] avatar ittaibaratz avatar macdonst avatar shazron avatar silvia-odwyer avatar stefan-guggisberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

adobe-fetch's Issues

getting private key via readFileSync returns error

When using readFileSync to read a private key, we get the following error:

Error while getting a new access token. TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, Buffer, TypedArray, DataView, or KeyObject. Received type object
    at prepareAsymmetricKey (internal/crypto/keys.js:267:13)
    at preparePrivateKey (internal/crypto/keys.js:285:10)
    at Sign.sign (internal/crypto/sig.js:80:46)

This is because we use 'merge' to copy the options which turns the buffer into an object.

Browser support

Does this library work in the browser? I notice the use of node-persist which implies probably not. Can you clarify? Thanks :)

Predefined headers

Currently we automatically adds x-api-key, x-request-id and x-gw-ims-org-id headers.

We would like to be able to configure all predefined headers. Preconfigured headers will be automatically added to every request made by adobe-fetch.

If the request already contains the header, it will take priority over the preconfigured header.

Note HTTP headers are case insensitive.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Calls to Adobe Privacy Service APIs fail

Expected Behaviour

Calls to https://platform.adobe.io/data/privacy/gdpr should return a set of jobs

 jobs:
   [{jobId: 'xxxx-xxxx-xxxx-xxxx-xxxx', statusCode: 4},
     {jobId: 'yyyy-yyyy-yyyy-yyyy-yyyy', statusCode: 4}]

Actual Behaviour

Calls to https://platform.adobe.io/data/privacy/gdpr fail with:

{
    "errors": {
        "errorCode": 401,
        "title": "Invalid Token",
        "detail": "Expecting bearer token with this request",
        "errorType": "uri=/data/privacy/gdpr"
    },
    "totalRecords": 0
}

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

$ node --version                                                                                                                                                                
v10.15.0

Sample Code that illustrates the problem

Running this code:

(async () => {
    const adobeFetch = require('@adobe/fetch').config({auth:{
        clientId: 'foo',
        clientSecret: 'foo',
        technicalAccountId: 'foo',
        orgId: 'foo',
        privateKey: 'foo',
        metaScopes: ['ent_gdpr_sdk']
    }});
   const response = await adobeFetch('https://platform.adobe.io/data/privacy/gdpr');
   console.log(await response.json());
})()

Results in:

{ errors:
   { errorCode: 401,
     title: 'Invalid Token',
     detail: 'Expecting bearer token with this request',
     errorType: 'uri=/data/privacy/gdpr' },
  totalRecords: 0 }

Logs taken while reproducing problem

An in-range update of prettier is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency prettier was updated from 2.0.3 to 2.0.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Release Notes for 2.0.4

🔗 Changelog

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Automatically generate x-request-id header

Automatically generate x-request-id header.

Requirements:

  • Generates a random GUID and send it as the x-request-id header.
  • Use UUID v4 (Random)
  • No longer than 30 characters
  • Developers can provide their own x-request-id which will override the default one.
  • Use debug to log x-request-id.

Browser support

Support use in a browser environment.

Requirements:

  • adobe/fetch should run in modern browser supporting the Fetch API (Polyfill will not be provided - Should be setup by the end developer).
  • When running in a browser, the access token will be acquired by the end developer, not by adobe/fetch. This is because we do not want to expose a private key in a browser. The developer will provide an async function which will fetch the access token from a server or a serverless function.
  • Use local storage instead of node-persist

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.