Git Product home page Git Product logo

escher-java's Introduction

EscherJava - HTTP request signing lib Build Status

Java implementation of the Escher HTTP request signing library

Prerequisite

In order to compile the project, Maven and JDK 1.8 (or above) are needed.

To check if maven is configured properly, run the mvn --version command and look at the line beginning with Java version.

Run the tests

To run all the tests, use the mvn test command or make test if you have Docker installed.

Release to Central Repository

To release the bundle.jar to the central maven repository check the RELEASE.md file

About Escher

More details are available at our Escher documentation site.

escher-java's People

Contributors

andrasp3a avatar boogie avatar doczir avatar dsztanko avatar eu-david avatar fugafree avatar gyuri152 avatar habela97 avatar hawser86 avatar jupposessho avatar knagy avatar losonczylaci avatar miklos-martin avatar ngabor84 avatar phraktle avatar potato avatar sigee avatar tsirait-esys avatar tt0th avatar tt1991 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

escher-java's Issues

Escher Put Request

Hi,
was trying to do a PUT request (following the testTheSimplestGetRequest() example in the escher-java/src/test/java/com/emarsys/escher/acceptance/AcceptanceTests.java file).

My Test method looks as follows:

    @Test
    public void testTheSimplestPutRequest() throws Exception {
        HttpRequestBase put = new HttpPut("https://xyz:443/api/api-services/");

        String body = "String test body";

        put = client.signPutRequest(put, body);
        String response = client.sendRequest(put);
    }

i have also modified the signRequest() to now accept a body like so:

    public HttpRequestBase signPutRequest(HttpRequestBase request, String body) throws EscherException {
        EscherRequestClientImpl escherRequest = new EscherRequestClientImpl(request, body);
        escher.signRequest(escherRequest, ESCHER_ACCESS_KEY_ID, ESCHER_SECRET, new ArrayList<>());
        return escherRequest.getHttpRequest();
    }

This returns the following error:

{"message":"HTTP Status 401 - verification failed for axbbc-9459-4798-a6cb-sddff: The signatures do not match (provided: xbxbxbxbx, calculated: fbfbfbf). path: api/api-services","errors":{}}

version: 0.3.1

Any ideas or any example on how to sign a PUT or POST request ?
Thanks

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.