Spring Social
  1. Spring Social
  2. SOCIAL-321

Enable easy configuration of ClientHttpRequestFactory

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.0.0 Backlog
    • Component/s: Connection Core
    • Labels:
      None

      Description

      Although OAuth1Template/OAuth2Template and AbstractOAuth1ApiBinding/AbstractOAuth2ApiBinding all have a setRequestFactory() method to allow for injection of a custom ClientHttpRequestFactory, that method is of little use when using the higher-level connection framework. Unless the developer creates a custom service provider implementation there is no easy way to set the connection factory on the underlying RestTemplate. And without some ugly casting, there's no easy way to change the request factory on an API binding when only the interface for that binding is given via the connect framework.

      There should be a convenient way for the developer to set the connection factory without deep-subclassing or awkward casting of the API binding.

        Activity

        Hide
        Craig Walls added a comment -

        One option to consider is a strategy for producing a request factory. The OAuth templates and API bindings can be injected with this strategy and use it instead of relying on their default connection factory. If it is left un-injected, then the current implementation will be in play.

        Show
        Craig Walls added a comment - One option to consider is a strategy for producing a request factory. The OAuth templates and API bindings can be injected with this strategy and use it instead of relying on their default connection factory. If it is left un-injected, then the current implementation will be in play.

          People

          • Assignee:
            Craig Walls
            Reporter:
            Craig Walls
          • Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated: