Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1196

Add extension points on RestRequest to support more REST authorization methods

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.0
    • None
    • libraries
    • None

      To use the Skara RestRequest interface to interact with certain REST APIs, we need to extend the ability for how authorization is handled. It's currently possible to supply a lambda that adds an authorization header. I would like this lambda to have access to the Request.Builder so that it's able to read existing headers.

      It's also common, at least among cloud providers, to require a SHA-256 hash of any contents (of a POST or PUT) in a header. The name of that header varies among providers however. I'm adding an optional field in the QueryBuilder to declare a header name for such a SHA-256 hash, with the RestRequest will automatically fill in if set.

      To support other implementations of pagination, I'm adding another FunctionalInterface for supplying a function for creating a HttpRequest.Builder for any "next" link in a HttpResponse. This has a default implementation based on the current next link logic, which can now be overridden.

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: