Consumers
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
Consumers is a module that does not do much on its own. Instead it's used by other modules to provide functionality for decoupled scenarios. Use this module as a dependency in your custom module to provide per-consumer variations of a feature. Or write a general purpose contrib module like Simple OAuth or Consumer Image Styles.
When is Consumers helpful?
Consumers will allow users to register consumers in Drupal (much like https://developers.facebook.com). It's a module that allows decoupled Drupal set ups to have variations based on the consumer making the request. All these options are gathered under a common umbrella so other projects can make use of them.
What modules are using Consumers?
- Simple OAuth
- Simple OAuth is the recommended OAuth2 solution for Drupal 8. It uses consumers to configure the different clients this specification needs.
- Consumer Image Styles
- Consumer Image Styles allows 3rd party application developers to specify the image styles their consumer needs. This module adds the URLs for those image variations when using JSON API.
Consumer negotiation
In order for your consumer to be discovered you will have to provide the UUID of the consumer entity in the request. You can do so by sending a custom header or a query string parameter.
Use the X-Consumer-ID: 3cf7e37f-f8b6-405e-bf76-7ec37f6caec5
header or the https://…?_consumer_id=3cf7e37f-f8b6-405e-bf76-7ec37f6caec5
query string parameter to provide context about the consumer that issued the request.
Logo is creative commons: https://pixabay.com/photo-443549/