This project is not covered by Drupal’s security advisory policy.

The Client Connection Manager aims to make it easier for modules to interact with an external (or local) connection/API.

The Benefit

This module provides reusability, flexibility, and less-rework. New services can create a new Client Connection plugin, taking care of repetitive configuration-related tasks, as well as packaging and componentizing that connection to the service. This allows other modules to merely initiate that connection instance and call the API. No establishing new forms, no re-dealing with how to save configuration and authorize the request, no recreating methods to connect to the same API as multiple other modules.

The Plugin

The module establishes a plugin type called Client Connection. This packages everything needed for an external connection, taking care of some of the repetitive tasks needed to connect to an API, like:

  • Retrieving, validation, and saving configuration from a form
  • Packaging a reusable methods or pre-initializing the client with authorization tokens. The plugin is a class that the developer can extended with methods to fit any API's specific needs (a trait to connect to Guzzle is provided out of the box)
  • An easy way to setup a new form instance merely by providing a route.

Loading by context

Packaging of the configuration allows for the connection to be loaded based on passed-in context. An example of this would be user-specific versus site-wide connections. Perhaps a module is setup to connect to a service, but later another module needs to modify that to resolve to a specific user if possible. No need to write a patch or do a wholesale copy-and-paste. Just add a resolver to modify which connection gets returned from the manager. If a specific connection is required (like for editing), you can load a specific connection via its instance ID.

Client Connection modules

Created a Client Connection? Submit an issue to add your module to the list.

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • Module categories: Integrations
  • Created by grathbone on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases