Integration Credentials
TheIntegrationCredential model provides a secure way to store OAuth credentials and other authentication data for integrations that cannot be defined in static configuration files ahead of time.
Purpose
Many integrations require OAuth flows where credentials are obtained dynamically through user authentication. These credentials cannot be hardcoded in config files and need to be stored securely in the database with encryption.Usage
The model provides three simple static methods for managing integration credentials:Store Credentials
Retrieve Credentials
Check if Credentials Exist
Security
Thedata column is automatically encrypted using Laravel’s encrypted:array cast, ensuring sensitive credentials are never stored in plain text in the database.
Example Implementation
TheBusinessCentralClientFactory demonstrates the integration pattern: