MicroHub | Microsoft Github MicroHub

 by   zhuowenli JavaScript Version: v1.1.2 License: MIT

kandi X-RAY | MicroHub Summary

kandi X-RAY | MicroHub Summary

MicroHub is a JavaScript library. MicroHub has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

A GitHub theme with Microsoft Style. Idea from Alexey Nazaroff's tweets (@nazarff). One-click install from Google Chrome Web Store ️ ️ ️.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              MicroHub has a low active ecosystem.
              It has 44 star(s) with 4 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              MicroHub has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of MicroHub is v1.1.2

            kandi-Quality Quality

              MicroHub has 0 bugs and 0 code smells.

            kandi-Security Security

              MicroHub has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              MicroHub code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              MicroHub is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              MicroHub releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MicroHub
            Get all kandi verified functions for this library.

            MicroHub Key Features

            No Key Features are available at this moment for MicroHub.

            MicroHub Examples and Code Snippets

            No Code Snippets are available at this moment for MicroHub.

            Community Discussions

            QUESTION

            CSRF token not properly handled when calling a function
            Asked 2020-Dec-10 at 08:45

            We're using SAP Cloud SDK 3.32.0 with SpringBoot. We've generated a typed OData service based on the EDMX metadata file generated by the service and use the generated client in our code. All logs entries showing our issue are below (cleaned them up a bit to show the important parts only)

            The situation is the following:

            • We send a myservice.createEntity(MyEntity).exectureRequest(myDestination) with the generated client. Since this is a modifying/creating call, the client first requests a CSRF token. This works fine as shown in the logs below (first HEAD and POST calls)
            • Next we call a function with myservice.myFunction(p1, p2, p3).executeRequest(myDestination). This is a function exposed by the same OData service, so the service path is the same. Since this function is a POST, the client will again try to fetch a CSRF token. However, this results in a HTTP 403 Forbidden status code. We do not get the CSRF token (see second HEAD request in the logs below).
            • The function call is still executed, but with an empty X-CSRF-Token http header (second POST request in logs).
            • Although we seem to receive a response from the OData service, the client finallly times out (Read time out) and we are unable to process the result of the function call.

            Debugging/clicking through the code of the CloudSDK, I discovered that the generated "FluentHelperFunction" class has it's own logic for retrieving the CSRF token (e.g. it uses "Fetch" in the HEAD requests), where as the FluentHelperCreate class uses the DefaultCsrfRetriever class (which uses lower case "fetch" for the HEAD call).

            So my questions are:

            • Why does the HEAD call for CSRF fail when done by a function call (i.e. myservice.myFunction())
            • Why does the FluentHelperFunction class have it's own logic for getting a CSRF token?
            • What can I do to make this work properly. Or is this a bug in the SDK?

            Logs:

            ...

            ANSWER

            Answered 2020-Nov-19 at 13:59

            This is indeed a shortcoming in the SDK. In previous versions all create/update/delete/function requests would fail if CSRF token retrieval failed. This was improved for most of the code. But as of today (SDK version 3.33.0) functions still have this behaviour.

            If you really need a workaround today the following should work for queries that use POST:

            Source https://stackoverflow.com/questions/64910882

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install MicroHub

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/zhuowenli/MicroHub.git

          • CLI

            gh repo clone zhuowenli/MicroHub

          • sshUrl

            git@github.com:zhuowenli/MicroHub.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by zhuowenli

            githuber

            by zhuowenliJavaScript

            vue-clipboards

            by zhuowenliJavaScript

            zhuowenli.github.io

            by zhuowenliJavaScript

            luobo

            by zhuowenliJavaScript

            tbone

            by zhuowenliJavaScript