Add examples module with client plugin examples

Created on 26 April 2024, 8 months ago
Updated 13 July 2024, 5 months ago

Problem/Motivation

Documentation was added thanks to Joel https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β†’

As part of a blog post we agreed to show some examples of client plugin implementations in this module. Instead of linking off to a blog post, these examples could just be part of the module in a separate module. (webform has various different examples https://git.drupalcode.org/project/webform/-/tree/6.2.x/modules?ref_type...)

There's no documentation better than an example, and since we can pull the examples from client projects, they will be very realistic examples.

Proposed resolution

We can start with 5 examples of different types:

  • A typical full OAuth 2 client with a grant type, audience, id/secret and token.
  • An example of using an SDK, but wrapping it in the client plugin for consistency and reusable code
  • A hardcoded auth token, this is typical for one-way embedded integrations like instagram widgets.
  • An example that shows just how subtle the differences are for OAuth, the access token request will return the token in a different key, like "access_token", and "expires_in", or "bearer_token" and "ext_expires_in". Just enough to make one-size-fits-all code very confusing.
  • An API that just requires an api key set and added to the request
✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States asherry

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024