Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ New Options: :ssl_client_cert and :ssl_client_key #220

Merged
merged 2 commits into from Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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