Oauth2 Client
Introduction
The OAuth2 Client module allows for the creation of OAuth2 clients as Drupal plugins, handling all back end functionality for retrieval, refresh, and deletion of tokens.
Quick Guide
Here is a brief overview of how to use this module to manage Oauth2 authorizations in your own module, with links to more detailed documentation on each part of the solution. If this is the first contributed module that you have worked with, there is existing documentation on drupal.org about how to work with composer in general and how to install a module.
- Determine your strategy for storing confidential data.
- Create an
Oauth2Client
plugin in your module that extendsOauth2ClientPluginBase
. - When your module is created and you browse to
/admin/config/system/oauth2-client
a configuration entity associated with your plugin is created. Edit and add your credentials. - Save and test
- Use the provided
Oauth2ClientService
to request your needed token.
Extending
Every aspect of the client behavior can be customized and extended.