net-http-ntlm 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +44 -0
- data/.gitignore +65 -0
- data/.rspec +3 -0
- data/.rubocop.yml +15 -0
- data/.simplecov +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +70 -0
- data/LICENSE +21 -0
- data/README.md +38 -0
- data/Rakefile +8 -0
- data/bin/bundle-audit +29 -0
- data/bin/bundler-audit +29 -0
- data/bin/console +14 -0
- data/bin/rubocop +29 -0
- data/bin/setup +8 -0
- data/lib/net/http/ntlm.rb +15 -0
- data/lib/net/http/ntlm/credentials.rb +31 -0
- data/lib/net/http/ntlm/transport.rb +55 -0
- data/lib/net/http/ntlm/version.rb +7 -0
- data/net-http-ntlm.gemspec +36 -0
- metadata +150 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b136952fd078c094ec85c2e78dd3d7d9a4debabe199dab0bd85f13665cb4a4ff
|
4
|
+
data.tar.gz: b53ab6adf869d124c1e9e4cfdf51737c54225e0f9f18872f661d95cbe148ee84
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ca6f9132f7300130f80e56a1ea41c92154f0e84a149beaee084436bed54364de622d52d3a1a297a934d19d0da6e43fcf7c31cfd045ebaa038da7f9be670b9603
|
7
|
+
data.tar.gz: 745928e94699848e2a6480badecb5f9be7251417bc6644c606d64d96957bd64be69ddd3eb1a6b9f51a4a94a1fb09eb69c47315d6bf7abfe93b6b922dd290c027
|
@@ -0,0 +1,44 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
pull_request_target:
|
9
|
+
branches:
|
10
|
+
- main
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
ci:
|
14
|
+
name: CI
|
15
|
+
strategy:
|
16
|
+
matrix:
|
17
|
+
os-version: [ 'ubuntu-latest' ]
|
18
|
+
ruby-version:
|
19
|
+
- 2.5
|
20
|
+
- 2.6
|
21
|
+
- 2.7
|
22
|
+
- 3.0
|
23
|
+
fail-fast: true
|
24
|
+
|
25
|
+
runs-on: ${{ matrix.os-version }}
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- name: Checkout code
|
29
|
+
uses: actions/checkout@v2
|
30
|
+
|
31
|
+
- name: Set up Ruby
|
32
|
+
uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: ${{ matrix.ruby-version }}
|
35
|
+
bundler-cache: true
|
36
|
+
|
37
|
+
- name: Run bundler-audit
|
38
|
+
run: bundle exec bundler-audit
|
39
|
+
|
40
|
+
# - name: Run rubocop
|
41
|
+
# run: bundle exec rubocop
|
42
|
+
|
43
|
+
- name: Run rspec
|
44
|
+
run: bundle exec rspec
|
data/.gitignore
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
# Ignore Byebug command history file.
|
17
|
+
.byebug_history
|
18
|
+
|
19
|
+
## Specific to RubyMotion:
|
20
|
+
.dat*
|
21
|
+
.repl_history
|
22
|
+
build/
|
23
|
+
*.bridgesupport
|
24
|
+
build-iPhoneOS/
|
25
|
+
build-iPhoneSimulator/
|
26
|
+
|
27
|
+
## Specific to RubyMotion (use of CocoaPods):
|
28
|
+
#
|
29
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
30
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
31
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
32
|
+
#
|
33
|
+
# vendor/Pods/
|
34
|
+
|
35
|
+
## Documentation cache and generated files:
|
36
|
+
/.yardoc/
|
37
|
+
/_yardoc/
|
38
|
+
/doc/
|
39
|
+
/rdoc/
|
40
|
+
|
41
|
+
## Environment normalization:
|
42
|
+
/.bundle/
|
43
|
+
/vendor/bundle
|
44
|
+
/lib/bundler/man/
|
45
|
+
|
46
|
+
# for a library or gem, you might want to ignore these files since the code is
|
47
|
+
# intended to run in multiple environments; otherwise, check them in:
|
48
|
+
# Gemfile.lock
|
49
|
+
# .ruby-version
|
50
|
+
# .ruby-gemset
|
51
|
+
|
52
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
53
|
+
.rvmrc
|
54
|
+
|
55
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
56
|
+
# .rubocop-https?--*
|
57
|
+
|
58
|
+
# rspec failure tracking
|
59
|
+
.rspec_status
|
60
|
+
|
61
|
+
# ASDF versioning
|
62
|
+
.tool-versions
|
63
|
+
|
64
|
+
# MacOS
|
65
|
+
.DS_Store
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.simplecov
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
net-http-ntlm (0.1.0)
|
5
|
+
rubyntlm (~> 0.6)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
bundler-audit (0.8.0)
|
12
|
+
bundler (>= 1.2.0, < 3)
|
13
|
+
thor (~> 1.0)
|
14
|
+
diff-lcs (1.4.4)
|
15
|
+
docile (1.4.0)
|
16
|
+
parallel (1.20.1)
|
17
|
+
parser (3.0.1.1)
|
18
|
+
ast (~> 2.4.1)
|
19
|
+
rainbow (3.0.0)
|
20
|
+
rake (12.3.3)
|
21
|
+
regexp_parser (2.1.1)
|
22
|
+
rexml (3.2.5)
|
23
|
+
rspec (3.10.0)
|
24
|
+
rspec-core (~> 3.10.0)
|
25
|
+
rspec-expectations (~> 3.10.0)
|
26
|
+
rspec-mocks (~> 3.10.0)
|
27
|
+
rspec-core (3.10.1)
|
28
|
+
rspec-support (~> 3.10.0)
|
29
|
+
rspec-expectations (3.10.1)
|
30
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
+
rspec-support (~> 3.10.0)
|
32
|
+
rspec-mocks (3.10.2)
|
33
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
+
rspec-support (~> 3.10.0)
|
35
|
+
rspec-support (3.10.2)
|
36
|
+
rubocop (1.15.0)
|
37
|
+
parallel (~> 1.10)
|
38
|
+
parser (>= 3.0.0.0)
|
39
|
+
rainbow (>= 2.2.2, < 4.0)
|
40
|
+
regexp_parser (>= 1.8, < 3.0)
|
41
|
+
rexml
|
42
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
43
|
+
ruby-progressbar (~> 1.7)
|
44
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
45
|
+
rubocop-ast (1.6.0)
|
46
|
+
parser (>= 3.0.1.1)
|
47
|
+
ruby-progressbar (1.11.0)
|
48
|
+
rubyntlm (0.6.3)
|
49
|
+
simplecov (0.21.2)
|
50
|
+
docile (~> 1.1)
|
51
|
+
simplecov-html (~> 0.11)
|
52
|
+
simplecov_json_formatter (~> 0.1)
|
53
|
+
simplecov-html (0.12.3)
|
54
|
+
simplecov_json_formatter (0.1.3)
|
55
|
+
thor (1.1.0)
|
56
|
+
unicode-display_width (2.0.0)
|
57
|
+
|
58
|
+
PLATFORMS
|
59
|
+
ruby
|
60
|
+
|
61
|
+
DEPENDENCIES
|
62
|
+
bundler-audit (~> 0.8)
|
63
|
+
net-http-ntlm!
|
64
|
+
rake (~> 12.0)
|
65
|
+
rspec (~> 3.0)
|
66
|
+
rubocop (~> 1.0)
|
67
|
+
simplecov
|
68
|
+
|
69
|
+
BUNDLED WITH
|
70
|
+
2.1.4
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021 atpoint ag
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# net-http-ntlm
|
2
|
+
[](https://github.com/at-point/net-http-ntlm/actions/workflows/ci.yml)
|
3
|
+
|
4
|
+
Adds NTLM authentication to HTTP requests using the rubyntlm gem.
|
5
|
+
A drop-in replacement for ruby-ntlm with NTLMv2 support.
|
6
|
+
|
7
|
+
NTLM authentication is used in Microsoft's server products,
|
8
|
+
such as MS Exchange Server and IIS.
|
9
|
+
|
10
|
+
Install
|
11
|
+
-------
|
12
|
+
|
13
|
+
```sh
|
14
|
+
$ sudo gem install net-http-ntlm
|
15
|
+
```
|
16
|
+
|
17
|
+
If you'd rather install net-http-ntlm using `bundler`, add a line for it in your Gemfile:
|
18
|
+
|
19
|
+
```rb
|
20
|
+
gem 'net-http-ntlm'
|
21
|
+
```
|
22
|
+
|
23
|
+
Usage
|
24
|
+
-----
|
25
|
+
|
26
|
+
```rb
|
27
|
+
require 'ntlm/http'
|
28
|
+
http = Net::HTTP.new('www.example.com')
|
29
|
+
request = Net::HTTP::Get.new('/')
|
30
|
+
request.ntlm_auth('User', 'Domain', 'Password')
|
31
|
+
response = http.request(request)
|
32
|
+
```
|
33
|
+
|
34
|
+
References
|
35
|
+
----------
|
36
|
+
|
37
|
+
* rubyntlm: https://github.com/WinRb/rubyntlm
|
38
|
+
* ruby-ntlm: https://github.com/macks/ruby-ntlm
|
data/Rakefile
ADDED
data/bin/bundle-audit
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bundle-audit' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("bundler-audit", "bundle-audit")
|
data/bin/bundler-audit
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bundler-audit' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("bundler-audit", "bundler-audit")
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "net/http/ntlm"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/rubocop
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/bin/setup
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'net/http'
|
4
|
+
require 'rubyntlm'
|
5
|
+
|
6
|
+
require 'net/http/ntlm/version'
|
7
|
+
require 'net/http/ntlm/credentials'
|
8
|
+
require 'net/http/ntlm/transport'
|
9
|
+
|
10
|
+
# Adds NTLM authentication to Net::HTTP
|
11
|
+
module Net::HTTP::NTLM
|
12
|
+
end
|
13
|
+
|
14
|
+
Net::HTTPGenericRequest.include(Net::HTTP::NTLM::Credentials)
|
15
|
+
Net::HTTP.include(Net::HTTP::NTLM::Transport)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Manages the credentials on Net::HTTP request objects
|
4
|
+
module Net::HTTP::NTLM::Credentials
|
5
|
+
def self.included(base)
|
6
|
+
base.attr_reader :ntlm_auth_domain, :ntlm_auth_user, :ntlm_auth_password
|
7
|
+
super
|
8
|
+
end
|
9
|
+
|
10
|
+
# Sets the NTLM credentials on a request
|
11
|
+
#
|
12
|
+
# @param user [String] Username
|
13
|
+
# @param domain [String] NT-Domain
|
14
|
+
# @param password [String] Password
|
15
|
+
def ntlm_auth(user, domain, password)
|
16
|
+
@ntlm_auth_user = user
|
17
|
+
@ntlm_auth_domain = domain
|
18
|
+
@ntlm_auth_password = password
|
19
|
+
end
|
20
|
+
|
21
|
+
# Returns the NTLM credentials as a hash
|
22
|
+
#
|
23
|
+
# @return [Hash] Hash with user, domain, password
|
24
|
+
def ntlm_auth_params
|
25
|
+
{
|
26
|
+
user: ntlm_auth_user,
|
27
|
+
domain: ntlm_auth_domain,
|
28
|
+
password: ntlm_auth_password
|
29
|
+
}
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Overloads the request method of Net::HTTP
|
4
|
+
module Net::HTTP::NTLM::Transport
|
5
|
+
def self.included(base)
|
6
|
+
base.alias_method :request_without_ntlm_auth, :request
|
7
|
+
base.alias_method :request, :request_with_ntlm
|
8
|
+
end
|
9
|
+
|
10
|
+
# Replaces the original request method, and tries to negotiate an NTLM authentication
|
11
|
+
#
|
12
|
+
# @param req [Net::HTTPGenericRequest] A Net::HTTP request
|
13
|
+
# @param body [String] Request body
|
14
|
+
# @yield [Net::HTTPResponse] Passes the HTTP response object to the block
|
15
|
+
# @return [Net::HTTPResponse] The HTTP response object
|
16
|
+
def request_with_ntlm(req, body = nil, &block) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
|
17
|
+
# If we don't have NTLM credentials, handle as regular request
|
18
|
+
return request_without_ntlm_auth(req, body, &block) unless req.ntlm_auth_user
|
19
|
+
|
20
|
+
unless started?
|
21
|
+
@original_body = req.body
|
22
|
+
req.body = nil
|
23
|
+
start do
|
24
|
+
req.delete('connection')
|
25
|
+
return request_with_ntlm(req, body, &block)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# Try to negotiate NTLM first
|
30
|
+
negotiation_message = Net::NTLM::Message::Type1.new
|
31
|
+
negotiation_message.domain = req.ntlm_auth_domain
|
32
|
+
req['authorization'] = "NTLM #{negotiation_message.encode64}"
|
33
|
+
res = request_without_ntlm_auth(req, body)
|
34
|
+
|
35
|
+
# Try to extract NTLM challenge from the response
|
36
|
+
www_auth_headers = Array(res.get_fields('www-authenticate'))
|
37
|
+
ntlm_challenge_header = www_auth_headers.find { |h| h.start_with?('NTLM') }
|
38
|
+
challenge = ntlm_challenge_header&.slice(/NTLM (.*)/, 1)
|
39
|
+
|
40
|
+
if challenge && res.code == '401'
|
41
|
+
# We got a challenge and correct response code, sending an authorized request
|
42
|
+
challenge_message = ::Net::NTLM::Message.decode64(challenge)
|
43
|
+
authorization_message = challenge_message.response(req.ntlm_auth_params, ntlmv2: true)
|
44
|
+
req['authorization'] = "NTLM #{authorization_message.encode64}"
|
45
|
+
# We must re-use the connection.
|
46
|
+
req.body_stream&.rewind
|
47
|
+
req.body = @original_body
|
48
|
+
request_without_ntlm_auth(req, body, &block)
|
49
|
+
else
|
50
|
+
# If we can't find a challenge or no authentication is required, return the response.
|
51
|
+
yield res if block_given?
|
52
|
+
res
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/net/http/ntlm/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'net-http-ntlm'
|
7
|
+
spec.version = Net::HTTP::NTLM::VERSION
|
8
|
+
spec.authors = ['Simon Schmid']
|
9
|
+
spec.email = ['simon@at-point.ch']
|
10
|
+
|
11
|
+
spec.summary = 'NTLM authentication for Net::HTTP'
|
12
|
+
spec.description = 'Adds NTLM authentication support for Net::HTTP using rubyntlm'
|
13
|
+
spec.homepage = 'https://github.com/at-point/net-http-ntlm'
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
15
|
+
|
16
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
17
|
+
spec.metadata['source_code_uri'] = 'https://github.com/at-point/net-http-ntlm'
|
18
|
+
spec.metadata['changelog_uri'] = 'https://github.com/at-point/net-http-ntlm/blob/main/CHANGELOG.md'
|
19
|
+
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
23
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
+
end
|
25
|
+
spec.bindir = 'exe'
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
+
spec.require_paths = ['lib']
|
28
|
+
|
29
|
+
spec.add_dependency 'rubyntlm', '~> 0.6'
|
30
|
+
|
31
|
+
spec.add_development_dependency 'bundler-audit', '~> 0.8'
|
32
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
34
|
+
spec.add_development_dependency 'rubocop', '~> 1.0'
|
35
|
+
spec.add_development_dependency 'simplecov'
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: net-http-ntlm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Simon Schmid
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubyntlm
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler-audit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.8'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '12.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '12.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Adds NTLM authentication support for Net::HTTP using rubyntlm
|
98
|
+
email:
|
99
|
+
- simon@at-point.ch
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".github/workflows/ci.yml"
|
105
|
+
- ".gitignore"
|
106
|
+
- ".rspec"
|
107
|
+
- ".rubocop.yml"
|
108
|
+
- ".simplecov"
|
109
|
+
- Gemfile
|
110
|
+
- Gemfile.lock
|
111
|
+
- LICENSE
|
112
|
+
- README.md
|
113
|
+
- Rakefile
|
114
|
+
- bin/bundle-audit
|
115
|
+
- bin/bundler-audit
|
116
|
+
- bin/console
|
117
|
+
- bin/rubocop
|
118
|
+
- bin/setup
|
119
|
+
- lib/net/http/ntlm.rb
|
120
|
+
- lib/net/http/ntlm/credentials.rb
|
121
|
+
- lib/net/http/ntlm/transport.rb
|
122
|
+
- lib/net/http/ntlm/version.rb
|
123
|
+
- net-http-ntlm.gemspec
|
124
|
+
homepage: https://github.com/at-point/net-http-ntlm
|
125
|
+
licenses: []
|
126
|
+
metadata:
|
127
|
+
homepage_uri: https://github.com/at-point/net-http-ntlm
|
128
|
+
source_code_uri: https://github.com/at-point/net-http-ntlm
|
129
|
+
changelog_uri: https://github.com/at-point/net-http-ntlm/blob/main/CHANGELOG.md
|
130
|
+
post_install_message:
|
131
|
+
rdoc_options: []
|
132
|
+
require_paths:
|
133
|
+
- lib
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 2.5.0
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
requirements: []
|
145
|
+
rubyforge_project:
|
146
|
+
rubygems_version: 2.7.6
|
147
|
+
signing_key:
|
148
|
+
specification_version: 4
|
149
|
+
summary: NTLM authentication for Net::HTTP
|
150
|
+
test_files: []
|