Module: HTTPX::Plugins::OAuth
- Defined in:
- lib/httpx/plugins/oauth.rb
Overview
This plugin adds support for managing an OAuth Session associated with the given session.
The scope of OAuth support is limited to the ‘client_crendentials` and `refresh_token` grants.
Defined Under Namespace
Modules: InstanceMethods, OAuthRetries, OptionsMethods Classes: OAuthSession
Constant Summary collapse
- SUPPORTED_GRANT_TYPES =
%w[client_credentials refresh_token].freeze
- SUPPORTED_AUTH_METHODS =
%w[client_secret_basic client_secret_post].freeze
Class Method Summary collapse
Class Method Details
.extra_options(options) ⇒ Object
25 26 27 |
# File 'lib/httpx/plugins/oauth.rb', line 25 def () .merge(auth_header_type: "Bearer") end |
.load_dependencies(klass) ⇒ Object
14 15 16 17 |
# File 'lib/httpx/plugins/oauth.rb', line 14 def load_dependencies(klass) require_relative "auth/basic" klass.plugin(:auth) end |
.subplugins ⇒ Object
19 20 21 22 23 |
# File 'lib/httpx/plugins/oauth.rb', line 19 def subplugins { retries: OAuthRetries, } end |