module HTTPX::Plugins::OAuth

  1. lib/httpx/plugins/oauth.rb

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.

gitlab.com/os85/httpx/wikis/OAuth

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
25 def extra_options(options)
26   options.merge(auth_header_type: "Bearer")
27 end
load_dependencies(klass)
[show source]
   # File lib/httpx/plugins/oauth.rb
14 def load_dependencies(klass)
15   require_relative "auth/basic"
16   klass.plugin(:auth)
17 end
subplugins()
[show source]
   # File lib/httpx/plugins/oauth.rb
19 def subplugins
20   {
21     retries: OAuthRetries,
22   }
23 end