Class: WhatsAppCloudApi::OAuth2
- Inherits:
-
Object
- Object
- WhatsAppCloudApi::OAuth2
- Defined in:
- lib/whats_app_cloud_api/http/auth/o_auth2.rb
Overview
Utility class for OAuth 2 authorization and token management.
Class Method Summary collapse
-
.apply(config, http_request) ⇒ Object
Add OAuth2 authentication to the http request.
Class Method Details
.apply(config, http_request) ⇒ Object
Add OAuth2 authentication to the http request. be added.
12 13 14 15 |
# File 'lib/whats_app_cloud_api/http/auth/o_auth2.rb', line 12 def self.apply(config, http_request) token = config.access_token http_request.headers['Authorization'] = "Bearer #{token}" end |