Skip to content

Commit

Permalink
🔀 Merge pull request #220 from oauth-xx/issue/136-client-certificate-…
Browse files Browse the repository at this point in the history
…options

✨ New Options: :ssl_client_cert and :ssl_client_key
  • Loading branch information
pboling committed Nov 1, 2021
2 parents 06acf79 + 761f6cb commit 99a8d0d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2021-10-31 21:29:49 UTC using RuboCop version 1.22.3.
# on 2021-11-01 06:50:04 UTC using RuboCop version 1.22.3.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -266,7 +266,7 @@ Layout/InitialIndentation:
Exclude:
- 'lib/oauth/request_proxy/curb_request.rb'

# Offense count: 11
# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
Layout/LeadingCommentSpace:
Expand All @@ -275,7 +275,6 @@ Layout/LeadingCommentSpace:
- '**/*.markdown'
- 'lib/oauth/helper.rb'
- 'lib/oauth/request_proxy.rb'
- 'oauth.gemspec'
- 'test/cases/spec/1_0-final/test_construct_request_url.rb'
- 'test/units/test_request_token.rb'

Expand Down Expand Up @@ -559,12 +558,12 @@ Lint/UselessMethodDefinition:
# Offense count: 50
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 59
Max: 63

# Offense count: 9
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 282
Max: 284

# Offense count: 7
# Configuration parameters: IgnoredMethods.
Expand All @@ -584,7 +583,7 @@ Metrics/ParameterLists:
# Offense count: 7
# Configuration parameters: IgnoredMethods.
Metrics/PerceivedComplexity:
Max: 18
Max: 20

# Offense count: 16
# Cop supports --auto-correct.
Expand Down Expand Up @@ -760,14 +759,13 @@ Style/AndOr:
- 'lib/oauth/consumer.rb'
- 'lib/oauth/request_proxy/rack_request.rb'

# Offense count: 9
# Offense count: 8
# Cop supports --auto-correct.
Style/ArrayJoin:
Exclude:
- 'lib/oauth/cli/base_command.rb'
- 'lib/oauth/cli/sign_command.rb'
- 'lib/oauth/client/net_http.rb'
- 'lib/oauth/errors/unauthorized.rb'
- 'lib/oauth/helper.rb'
- 'lib/oauth/request_proxy/base.rb'

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Setup Rubocop (#205, #208 by @pboling)
* Added CODE_OF_CONDUCT.md (#217, #218 by @pboling)
* Added FUNDING.yml (#217, #218 by @pboling)
* Added Client Certificate Options: :ssl_client_cert and :ssl_client_key (#136, #220 by @pboling)

### Changed

Expand Down
2 changes: 2 additions & 0 deletions lib/oauth/consumer.rb
Expand Up @@ -383,6 +383,8 @@ def create_http(_url = nil)
http_object.read_timeout = http_object.open_timeout = @options[:timeout] || 60
http_object.open_timeout = @options[:open_timeout] if @options[:open_timeout]
http_object.ssl_version = @options[:ssl_version] if @options[:ssl_version]
http_object.cert = @options[:ssl_client_cert] if @options[:ssl_client_cert]
http_object.key = @options[:ssl_client_key] if @options[:ssl_client_key]
http_object.set_debug_output(debug_output) if debug_output

http_object
Expand Down

0 comments on commit 99a8d0d

Please sign in to comment.