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.
Classes and Modules
Constants
| SUPPORTED_AUTH_METHODS | = | %w[client_secret_basic client_secret_post].freeze | ||
| SUPPORTED_GRANT_TYPES | = | %w[client_credentials refresh_token].freeze |
Public Class methods
extra_options(options)
[show source]
# File lib/httpx/plugins/oauth.rb 26 def extra_options(options) 27 options.merge(auth_header_type: "Bearer") 28 end
load_dependencies(klass)
[show source]
# File lib/httpx/plugins/oauth.rb 14 def load_dependencies(klass) 15 require "monitor" 16 require_relative "auth/basic" 17 klass.plugin(:auth) 18 end
subplugins()
[show source]
# File lib/httpx/plugins/oauth.rb 20 def subplugins 21 { 22 retries: OAuthRetries, 23 } 24 end