oauth2 1.4.4 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -2
- data/CODE_OF_CONDUCT.md +105 -46
- data/LICENSE +1 -1
- data/README.md +277 -112
- data/lib/oauth2/access_token.rb +8 -7
- data/lib/oauth2/authenticator.rb +1 -1
- data/lib/oauth2/client.rb +64 -21
- data/lib/oauth2/error.rb +1 -1
- data/lib/oauth2/mac_token.rb +16 -10
- data/lib/oauth2/response.rb +5 -3
- data/lib/oauth2/strategy/assertion.rb +3 -3
- data/lib/oauth2/strategy/password.rb +2 -2
- data/lib/oauth2/version.rb +9 -3
- data/spec/helper.rb +30 -0
- data/spec/oauth2/access_token_spec.rb +216 -0
- data/spec/oauth2/authenticator_spec.rb +84 -0
- data/spec/oauth2/client_spec.rb +530 -0
- data/spec/oauth2/mac_token_spec.rb +120 -0
- data/spec/oauth2/response_spec.rb +90 -0
- data/spec/oauth2/strategy/assertion_spec.rb +59 -0
- data/spec/oauth2/strategy/auth_code_spec.rb +107 -0
- data/spec/oauth2/strategy/base_spec.rb +5 -0
- data/spec/oauth2/strategy/client_credentials_spec.rb +69 -0
- data/spec/oauth2/strategy/implicit_spec.rb +26 -0
- data/spec/oauth2/strategy/password_spec.rb +56 -0
- data/spec/oauth2/version_spec.rb +23 -0
- metadata +41 -57
- data/.document +0 -5
- data/.gitignore +0 -19
- data/.jrubyrc +0 -1
- data/.rspec +0 -2
- data/.rubocop.yml +0 -80
- data/.rubocop_rspec.yml +0 -26
- data/.rubocop_todo.yml +0 -15
- data/.ruby-version +0 -1
- data/.travis.yml +0 -87
- data/CONTRIBUTING.md +0 -18
- data/Gemfile +0 -40
- data/Rakefile +0 -45
- data/gemfiles/jruby_1.7.gemfile +0 -11
- data/gemfiles/jruby_9.0.gemfile +0 -7
- data/gemfiles/jruby_9.1.gemfile +0 -3
- data/gemfiles/jruby_9.2.gemfile +0 -3
- data/gemfiles/jruby_head.gemfile +0 -3
- data/gemfiles/ruby_1.9.gemfile +0 -11
- data/gemfiles/ruby_2.0.gemfile +0 -6
- data/gemfiles/ruby_2.1.gemfile +0 -6
- data/gemfiles/ruby_2.2.gemfile +0 -3
- data/gemfiles/ruby_2.3.gemfile +0 -3
- data/gemfiles/ruby_2.4.gemfile +0 -3
- data/gemfiles/ruby_2.5.gemfile +0 -3
- data/gemfiles/ruby_2.6.gemfile +0 -9
- data/gemfiles/ruby_2.7.gemfile +0 -9
- data/gemfiles/ruby_head.gemfile +0 -9
- data/gemfiles/truffleruby.gemfile +0 -3
- data/oauth2.gemspec +0 -52
@@ -0,0 +1,90 @@
|
|
1
|
+
describe OAuth2::Response do
|
2
|
+
describe '#initialize' do
|
3
|
+
let(:status) { 200 }
|
4
|
+
let(:headers) { {'foo' => 'bar'} }
|
5
|
+
let(:body) { 'foo' }
|
6
|
+
|
7
|
+
it 'returns the status, headers and body' do
|
8
|
+
response = double('response', :headers => headers,
|
9
|
+
:status => status,
|
10
|
+
:body => body)
|
11
|
+
subject = described_class.new(response)
|
12
|
+
expect(subject.headers).to eq(headers)
|
13
|
+
expect(subject.status).to eq(status)
|
14
|
+
expect(subject.body).to eq(body)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe '.register_parser' do
|
19
|
+
let(:response) do
|
20
|
+
double('response', :headers => {'Content-Type' => 'application/foo-bar'},
|
21
|
+
:status => 200,
|
22
|
+
:body => 'baz')
|
23
|
+
end
|
24
|
+
|
25
|
+
before do
|
26
|
+
described_class.register_parser(:foobar, 'application/foo-bar') do |body|
|
27
|
+
"foobar #{body}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'adds to the content types and parsers' do
|
32
|
+
expect(described_class.send(:class_variable_get, :@@parsers).keys).to include(:foobar)
|
33
|
+
expect(described_class.send(:class_variable_get, :@@content_types).keys).to include('application/foo-bar')
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'is able to parse that content type automatically' do
|
37
|
+
expect(described_class.new(response).parsed).to eq('foobar baz')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe '#parsed' do
|
42
|
+
it 'parses application/x-www-form-urlencoded body' do
|
43
|
+
headers = {'Content-Type' => 'application/x-www-form-urlencoded'}
|
44
|
+
body = 'foo=bar&answer=42'
|
45
|
+
response = double('response', :headers => headers, :body => body)
|
46
|
+
subject = described_class.new(response)
|
47
|
+
expect(subject.parsed.keys.size).to eq(2)
|
48
|
+
expect(subject.parsed['foo']).to eq('bar')
|
49
|
+
expect(subject.parsed['answer']).to eq('42')
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'parses application/json body' do
|
53
|
+
headers = {'Content-Type' => 'application/json'}
|
54
|
+
body = MultiJson.encode(:foo => 'bar', :answer => 42)
|
55
|
+
response = double('response', :headers => headers, :body => body)
|
56
|
+
subject = described_class.new(response)
|
57
|
+
expect(subject.parsed.keys.size).to eq(2)
|
58
|
+
expect(subject.parsed['foo']).to eq('bar')
|
59
|
+
expect(subject.parsed['answer']).to eq(42)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "doesn't try to parse other content-types" do
|
63
|
+
headers = {'Content-Type' => 'text/html'}
|
64
|
+
body = '<!DOCTYPE html><html><head></head><body></body></html>'
|
65
|
+
|
66
|
+
response = double('response', :headers => headers, :body => body)
|
67
|
+
|
68
|
+
expect(MultiJson).not_to receive(:decode)
|
69
|
+
expect(MultiJson).not_to receive(:load)
|
70
|
+
expect(Rack::Utils).not_to receive(:parse_query)
|
71
|
+
|
72
|
+
subject = described_class.new(response)
|
73
|
+
expect(subject.parsed).to be_nil
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
context 'with xml parser registration' do
|
78
|
+
it 'tries to load multi_xml and use it' do
|
79
|
+
expect(described_class.send(:class_variable_get, :@@parsers)[:xml]).not_to be_nil
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'is able to parse xml' do
|
83
|
+
headers = {'Content-Type' => 'text/xml'}
|
84
|
+
body = '<?xml version="1.0" standalone="yes" ?><foo><bar>baz</bar></foo>'
|
85
|
+
|
86
|
+
response = double('response', :headers => headers, :body => body)
|
87
|
+
expect(described_class.new(response).parsed).to eq('foo' => {'bar' => 'baz'})
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
describe OAuth2::Strategy::Assertion do
|
2
|
+
subject { client.assertion }
|
3
|
+
|
4
|
+
let(:client) do
|
5
|
+
cli = OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com')
|
6
|
+
cli.connection = Faraday.new(cli.site, cli.options[:connection_opts]) do |b|
|
7
|
+
b.request :url_encoded
|
8
|
+
b.adapter :test do |stub|
|
9
|
+
stub.post('/oauth/token') do |env|
|
10
|
+
case @mode
|
11
|
+
when 'formencoded'
|
12
|
+
[200, {'Content-Type' => 'application/x-www-form-urlencoded'}, 'expires_in=600&access_token=salmon&refresh_token=trout']
|
13
|
+
when 'json'
|
14
|
+
[200, {'Content-Type' => 'application/json'}, '{"expires_in":600,"access_token":"salmon","refresh_token":"trout"}']
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
cli
|
20
|
+
end
|
21
|
+
|
22
|
+
let(:params) do
|
23
|
+
{
|
24
|
+
:hmac_secret => 'foo',
|
25
|
+
:exp => Time.now.utc.to_i + 3600,
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#authorize_url' do
|
30
|
+
it 'raises NotImplementedError' do
|
31
|
+
expect { subject.authorize_url }.to raise_error(NotImplementedError)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
%w[json formencoded].each do |mode|
|
36
|
+
describe "#get_token (#{mode})" do
|
37
|
+
before do
|
38
|
+
@mode = mode
|
39
|
+
@access = subject.get_token(params)
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'returns AccessToken with same Client' do
|
43
|
+
expect(@access.client).to eq(client)
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'returns AccessToken with #token' do
|
47
|
+
expect(@access.token).to eq('salmon')
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'returns AccessToken with #expires_in' do
|
51
|
+
expect(@access.expires_in).to eq(600)
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'returns AccessToken with #expires_at' do
|
55
|
+
expect(@access.expires_at).not_to be_nil
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
describe OAuth2::Strategy::AuthCode do
|
4
|
+
subject { client.auth_code }
|
5
|
+
|
6
|
+
let(:code) { 'sushi' }
|
7
|
+
let(:kvform_token) { 'expires_in=600&access_token=salmon&refresh_token=trout&extra_param=steve' }
|
8
|
+
let(:facebook_token) { kvform_token.gsub('_in', '') }
|
9
|
+
let(:json_token) { MultiJson.encode(:expires_in => 600, :access_token => 'salmon', :refresh_token => 'trout', :extra_param => 'steve') }
|
10
|
+
|
11
|
+
let(:client) do
|
12
|
+
OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') do |builder|
|
13
|
+
builder.adapter :test do |stub|
|
14
|
+
stub.get("/oauth/token?client_id=abc&client_secret=def&code=#{code}&grant_type=authorization_code") do |env|
|
15
|
+
case @mode
|
16
|
+
when 'formencoded'
|
17
|
+
[200, {'Content-Type' => 'application/x-www-form-urlencoded'}, kvform_token]
|
18
|
+
when 'json'
|
19
|
+
[200, {'Content-Type' => 'application/json'}, json_token]
|
20
|
+
when 'from_facebook'
|
21
|
+
[200, {'Content-Type' => 'application/x-www-form-urlencoded'}, facebook_token]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
stub.post('/oauth/token', 'client_id' => 'abc', 'client_secret' => 'def', 'code' => 'sushi', 'grant_type' => 'authorization_code') do |env|
|
25
|
+
case @mode
|
26
|
+
when 'formencoded'
|
27
|
+
[200, {'Content-Type' => 'application/x-www-form-urlencoded'}, kvform_token]
|
28
|
+
when 'json'
|
29
|
+
[200, {'Content-Type' => 'application/json'}, json_token]
|
30
|
+
when 'from_facebook'
|
31
|
+
[200, {'Content-Type' => 'application/x-www-form-urlencoded'}, facebook_token]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '#authorize_url' do
|
39
|
+
it 'includes the client_id' do
|
40
|
+
expect(subject.authorize_url).to include('client_id=abc')
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'includes the type' do
|
44
|
+
expect(subject.authorize_url).to include('response_type=code')
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'includes passed in options' do
|
48
|
+
cb = 'http://myserver.local/oauth/callback'
|
49
|
+
expect(subject.authorize_url(:redirect_uri => cb)).to include("redirect_uri=#{Rack::Utils.escape(cb)}")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe '#get_token (handling utf-8 data)' do
|
54
|
+
let(:json_token) { MultiJson.encode(:expires_in => 600, :access_token => 'salmon', :refresh_token => 'trout', :extra_param => 'André') }
|
55
|
+
|
56
|
+
before do
|
57
|
+
@mode = 'json'
|
58
|
+
client.options[:token_method] = :post
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'does not raise an error' do
|
62
|
+
expect { subject.get_token(code) }.not_to raise_error
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'does not create an error instance' do
|
66
|
+
expect(OAuth2::Error).not_to receive(:new)
|
67
|
+
|
68
|
+
subject.get_token(code)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
%w[json formencoded from_facebook].each do |mode|
|
73
|
+
[:get, :post].each do |verb|
|
74
|
+
describe "#get_token (#{mode}, access_token_method=#{verb}" do
|
75
|
+
before do
|
76
|
+
@mode = mode
|
77
|
+
client.options[:token_method] = verb
|
78
|
+
@access = subject.get_token(code)
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'returns AccessToken with same Client' do
|
82
|
+
expect(@access.client).to eq(client)
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'returns AccessToken with #token' do
|
86
|
+
expect(@access.token).to eq('salmon')
|
87
|
+
end
|
88
|
+
|
89
|
+
it 'returns AccessToken with #refresh_token' do
|
90
|
+
expect(@access.refresh_token).to eq('trout')
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'returns AccessToken with #expires_in' do
|
94
|
+
expect(@access.expires_in).to eq(600)
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'returns AccessToken with #expires_at' do
|
98
|
+
expect(@access.expires_at).to be_kind_of(Integer)
|
99
|
+
end
|
100
|
+
|
101
|
+
it 'returns AccessToken with params accessible via []' do
|
102
|
+
expect(@access['extra_param']).to eq('steve')
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
describe OAuth2::Strategy::ClientCredentials do
|
2
|
+
subject { client.client_credentials }
|
3
|
+
|
4
|
+
let(:kvform_token) { 'expires_in=600&access_token=salmon&refresh_token=trout' }
|
5
|
+
let(:json_token) { '{"expires_in":600,"access_token":"salmon","refresh_token":"trout"}' }
|
6
|
+
|
7
|
+
let(:client) do
|
8
|
+
OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') do |builder|
|
9
|
+
builder.adapter :test do |stub|
|
10
|
+
stub.post('/oauth/token', 'grant_type' => 'client_credentials') do |env|
|
11
|
+
client_id, client_secret = Base64.decode64(env[:request_headers]['Authorization'].split(' ', 2)[1]).split(':', 2)
|
12
|
+
(client_id == 'abc' && client_secret == 'def') || raise(Faraday::Adapter::Test::Stubs::NotFound)
|
13
|
+
case @mode
|
14
|
+
when 'formencoded'
|
15
|
+
[200, {'Content-Type' => 'application/x-www-form-urlencoded'}, kvform_token]
|
16
|
+
when 'json'
|
17
|
+
[200, {'Content-Type' => 'application/json'}, json_token]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
stub.post('/oauth/token', 'client_id' => 'abc', 'client_secret' => 'def', 'grant_type' => 'client_credentials') do |env|
|
21
|
+
case @mode
|
22
|
+
when 'formencoded'
|
23
|
+
[200, {'Content-Type' => 'application/x-www-form-urlencoded'}, kvform_token]
|
24
|
+
when 'json'
|
25
|
+
[200, {'Content-Type' => 'application/json'}, json_token]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe '#authorize_url' do
|
33
|
+
it 'raises NotImplementedError' do
|
34
|
+
expect { subject.authorize_url }.to raise_error(NotImplementedError)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
%w[json formencoded].each do |mode|
|
39
|
+
[:basic_auth, :request_body].each do |auth_scheme|
|
40
|
+
describe "#get_token (#{mode}) (#{auth_scheme})" do
|
41
|
+
before do
|
42
|
+
@mode = mode
|
43
|
+
client.options[:auth_scheme] = auth_scheme
|
44
|
+
@access = subject.get_token
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'returns AccessToken with same Client' do
|
48
|
+
expect(@access.client).to eq(client)
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'returns AccessToken with #token' do
|
52
|
+
expect(@access.token).to eq('salmon')
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'returns AccessToken without #refresh_token' do
|
56
|
+
expect(@access.refresh_token).to be_nil
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'returns AccessToken with #expires_in' do
|
60
|
+
expect(@access.expires_in).to eq(600)
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'returns AccessToken with #expires_at' do
|
64
|
+
expect(@access.expires_at).not_to be_nil
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
describe OAuth2::Strategy::Implicit do
|
2
|
+
subject { client.implicit }
|
3
|
+
|
4
|
+
let(:client) { OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') }
|
5
|
+
|
6
|
+
describe '#authorize_url' do
|
7
|
+
it 'includes the client_id' do
|
8
|
+
expect(subject.authorize_url).to include('client_id=abc')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'includes the type' do
|
12
|
+
expect(subject.authorize_url).to include('response_type=token')
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'includes passed in options' do
|
16
|
+
cb = 'http://myserver.local/oauth/callback'
|
17
|
+
expect(subject.authorize_url(:redirect_uri => cb)).to include("redirect_uri=#{Rack::Utils.escape(cb)}")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '#get_token' do
|
22
|
+
it 'raises NotImplementedError' do
|
23
|
+
expect { subject.get_token }.to raise_error(NotImplementedError)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
describe OAuth2::Strategy::Password do
|
2
|
+
subject { client.password }
|
3
|
+
|
4
|
+
let(:client) do
|
5
|
+
cli = OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com')
|
6
|
+
cli.connection = Faraday.new(cli.site, cli.options[:connection_opts]) do |b|
|
7
|
+
b.request :url_encoded
|
8
|
+
b.adapter :test do |stub|
|
9
|
+
stub.post('/oauth/token') do |env|
|
10
|
+
case @mode
|
11
|
+
when 'formencoded'
|
12
|
+
[200, {'Content-Type' => 'application/x-www-form-urlencoded'}, 'expires_in=600&access_token=salmon&refresh_token=trout']
|
13
|
+
when 'json'
|
14
|
+
[200, {'Content-Type' => 'application/json'}, '{"expires_in":600,"access_token":"salmon","refresh_token":"trout"}']
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
cli
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#authorize_url' do
|
23
|
+
it 'raises NotImplementedError' do
|
24
|
+
expect { subject.authorize_url }.to raise_error(NotImplementedError)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
%w[json formencoded].each do |mode|
|
29
|
+
describe "#get_token (#{mode})" do
|
30
|
+
before do
|
31
|
+
@mode = mode
|
32
|
+
@access = subject.get_token('username', 'password')
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'returns AccessToken with same Client' do
|
36
|
+
expect(@access.client).to eq(client)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'returns AccessToken with #token' do
|
40
|
+
expect(@access.token).to eq('salmon')
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'returns AccessToken with #refresh_token' do
|
44
|
+
expect(@access.refresh_token).to eq('trout')
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'returns AccessToken with #expires_in' do
|
48
|
+
expect(@access.expires_in).to eq(600)
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'returns AccessToken with #expires_at' do
|
52
|
+
expect(@access.expires_at).not_to be_nil
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe OAuth2::Version do
|
4
|
+
it 'has a version number' do
|
5
|
+
expect(described_class).not_to be nil
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'can be a string' do
|
9
|
+
expect(described_class.to_s).to be_a(String)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'allows Constant access' do
|
13
|
+
expect(described_class::VERSION).to be_a(String)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'is greater than 0.1.0' do
|
17
|
+
expect(Gem::Version.new(described_class) > Gem::Version.new('0.1.0')).to be(true)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'is not a pre-release' do
|
21
|
+
expect(Gem::Version.new(described_class).prerelease?).to be(false)
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
8
8
|
- Michael Bleigh
|
9
9
|
- Erik Michaels-Ober
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2022-02-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0.8'
|
22
22
|
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: '
|
24
|
+
version: '3.0'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
version: '0.8'
|
32
32
|
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '3.0'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: jwt
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,20 +142,6 @@ dependencies:
|
|
142
142
|
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '1.16'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: coveralls
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - "~>"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0.8'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - "~>"
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '0.8'
|
159
145
|
- !ruby/object:Gem::Dependency
|
160
146
|
name: rake
|
161
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +191,7 @@ dependencies:
|
|
205
191
|
- !ruby/object:Gem::Version
|
206
192
|
version: '3.0'
|
207
193
|
- !ruby/object:Gem::Dependency
|
208
|
-
name: rspec-
|
194
|
+
name: rspec-block_is_expected
|
209
195
|
requirement: !ruby/object:Gem::Requirement
|
210
196
|
requirements:
|
211
197
|
- - ">="
|
@@ -233,7 +219,7 @@ dependencies:
|
|
233
219
|
- !ruby/object:Gem::Version
|
234
220
|
version: '0'
|
235
221
|
- !ruby/object:Gem::Dependency
|
236
|
-
name: rspec-
|
222
|
+
name: rspec-stubbed_env
|
237
223
|
requirement: !ruby/object:Gem::Requirement
|
238
224
|
requirements:
|
239
225
|
- - ">="
|
@@ -282,38 +268,10 @@ executables: []
|
|
282
268
|
extensions: []
|
283
269
|
extra_rdoc_files: []
|
284
270
|
files:
|
285
|
-
- ".document"
|
286
|
-
- ".gitignore"
|
287
|
-
- ".jrubyrc"
|
288
|
-
- ".rspec"
|
289
|
-
- ".rubocop.yml"
|
290
|
-
- ".rubocop_rspec.yml"
|
291
|
-
- ".rubocop_todo.yml"
|
292
|
-
- ".ruby-version"
|
293
|
-
- ".travis.yml"
|
294
271
|
- CHANGELOG.md
|
295
272
|
- CODE_OF_CONDUCT.md
|
296
|
-
- CONTRIBUTING.md
|
297
|
-
- Gemfile
|
298
273
|
- LICENSE
|
299
274
|
- README.md
|
300
|
-
- Rakefile
|
301
|
-
- gemfiles/jruby_1.7.gemfile
|
302
|
-
- gemfiles/jruby_9.0.gemfile
|
303
|
-
- gemfiles/jruby_9.1.gemfile
|
304
|
-
- gemfiles/jruby_9.2.gemfile
|
305
|
-
- gemfiles/jruby_head.gemfile
|
306
|
-
- gemfiles/ruby_1.9.gemfile
|
307
|
-
- gemfiles/ruby_2.0.gemfile
|
308
|
-
- gemfiles/ruby_2.1.gemfile
|
309
|
-
- gemfiles/ruby_2.2.gemfile
|
310
|
-
- gemfiles/ruby_2.3.gemfile
|
311
|
-
- gemfiles/ruby_2.4.gemfile
|
312
|
-
- gemfiles/ruby_2.5.gemfile
|
313
|
-
- gemfiles/ruby_2.6.gemfile
|
314
|
-
- gemfiles/ruby_2.7.gemfile
|
315
|
-
- gemfiles/ruby_head.gemfile
|
316
|
-
- gemfiles/truffleruby.gemfile
|
317
275
|
- lib/oauth2.rb
|
318
276
|
- lib/oauth2/access_token.rb
|
319
277
|
- lib/oauth2/authenticator.rb
|
@@ -328,17 +286,30 @@ files:
|
|
328
286
|
- lib/oauth2/strategy/implicit.rb
|
329
287
|
- lib/oauth2/strategy/password.rb
|
330
288
|
- lib/oauth2/version.rb
|
331
|
-
-
|
289
|
+
- spec/helper.rb
|
290
|
+
- spec/oauth2/access_token_spec.rb
|
291
|
+
- spec/oauth2/authenticator_spec.rb
|
292
|
+
- spec/oauth2/client_spec.rb
|
293
|
+
- spec/oauth2/mac_token_spec.rb
|
294
|
+
- spec/oauth2/response_spec.rb
|
295
|
+
- spec/oauth2/strategy/assertion_spec.rb
|
296
|
+
- spec/oauth2/strategy/auth_code_spec.rb
|
297
|
+
- spec/oauth2/strategy/base_spec.rb
|
298
|
+
- spec/oauth2/strategy/client_credentials_spec.rb
|
299
|
+
- spec/oauth2/strategy/implicit_spec.rb
|
300
|
+
- spec/oauth2/strategy/password_spec.rb
|
301
|
+
- spec/oauth2/version_spec.rb
|
332
302
|
homepage: https://github.com/oauth-xx/oauth2
|
333
303
|
licenses:
|
334
304
|
- MIT
|
335
305
|
metadata:
|
336
306
|
bug_tracker_uri: https://github.com/oauth-xx/oauth2/issues
|
337
|
-
changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.
|
338
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.
|
339
|
-
source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.
|
307
|
+
changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.8/CHANGELOG.md
|
308
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.8
|
309
|
+
source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.8
|
340
310
|
wiki_uri: https://github.com/oauth-xx/oauth2/wiki
|
341
|
-
|
311
|
+
rubygems_mfa_required: 'true'
|
312
|
+
post_install_message:
|
342
313
|
rdoc_options: []
|
343
314
|
require_paths:
|
344
315
|
- lib
|
@@ -353,8 +324,21 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
324
|
- !ruby/object:Gem::Version
|
354
325
|
version: 1.3.5
|
355
326
|
requirements: []
|
356
|
-
rubygems_version: 3.
|
357
|
-
signing_key:
|
327
|
+
rubygems_version: 3.3.7
|
328
|
+
signing_key:
|
358
329
|
specification_version: 4
|
359
330
|
summary: A Ruby wrapper for the OAuth 2.0 protocol.
|
360
|
-
test_files:
|
331
|
+
test_files:
|
332
|
+
- spec/helper.rb
|
333
|
+
- spec/oauth2/access_token_spec.rb
|
334
|
+
- spec/oauth2/authenticator_spec.rb
|
335
|
+
- spec/oauth2/client_spec.rb
|
336
|
+
- spec/oauth2/mac_token_spec.rb
|
337
|
+
- spec/oauth2/response_spec.rb
|
338
|
+
- spec/oauth2/strategy/assertion_spec.rb
|
339
|
+
- spec/oauth2/strategy/auth_code_spec.rb
|
340
|
+
- spec/oauth2/strategy/base_spec.rb
|
341
|
+
- spec/oauth2/strategy/client_credentials_spec.rb
|
342
|
+
- spec/oauth2/strategy/implicit_spec.rb
|
343
|
+
- spec/oauth2/strategy/password_spec.rb
|
344
|
+
- spec/oauth2/version_spec.rb
|
data/.document
DELETED
data/.gitignore
DELETED
data/.jrubyrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
debug.fullTrace=true
|
data/.rspec
DELETED