omniauth-cas 1.1.0.beta.1 → 1.1.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/.editorconfig +16 -0
- data/.ruby-version +1 -0
- data/.travis.yml +1 -0
- data/README.md +36 -10
- data/lib/omniauth-cas.rb +1 -1
- data/lib/omniauth/cas/version.rb +1 -1
- data/lib/omniauth/strategies/cas.rb +99 -49
- data/lib/omniauth/strategies/cas/logout_request.rb +58 -0
- data/lib/omniauth/strategies/cas/service_ticket_validator.rb +18 -10
- data/omniauth-cas.gemspec +5 -7
- data/spec/fixtures/cas_success_jasig.xml +16 -0
- data/spec/omniauth/strategies/cas/logout_request_spec.rb +103 -0
- data/spec/omniauth/strategies/cas/service_ticket_validator_spec.rb +35 -13
- data/spec/omniauth/strategies/cas_spec.rb +174 -77
- data/spec/spec_helper.rb +0 -4
- metadata +39 -51
- data/.rvmrc +0 -1
- data/History.md +0 -58
- data/lib/omniauth/strategies/cas/configuration.rb +0 -34
- data/spec/omniauth/strategies/cas/configuration_spec.rb +0 -60
data/spec/spec_helper.rb
CHANGED
@@ -4,12 +4,8 @@ require 'awesome_print'
|
|
4
4
|
RSpec.configure do |c|
|
5
5
|
c.filter_run focus: true
|
6
6
|
c.run_all_when_everything_filtered = true
|
7
|
-
c.treat_symbols_as_metadata_keys_with_true_values = true
|
8
7
|
end
|
9
8
|
|
10
|
-
require 'simplecov'
|
11
|
-
SimpleCov.start
|
12
|
-
|
13
9
|
require 'rack/test'
|
14
10
|
require 'webmock/rspec'
|
15
11
|
require 'omniauth-cas'
|
metadata
CHANGED
@@ -1,153 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-cas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.
|
4
|
+
version: 1.1.0.pre.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Lindahl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.5'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: addressable
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '2.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
61
|
+
version: '10.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
68
|
+
version: '10.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.19.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
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.7.1
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ~>
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 0.7.1
|
82
|
+
version: 1.19.0
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: rspec
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
|
-
- - ~>
|
87
|
+
- - "~>"
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
89
|
+
version: 3.1.0
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
|
-
- - ~>
|
94
|
+
- - "~>"
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
96
|
+
version: 3.1.0
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: rack-test
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
|
-
- - ~>
|
101
|
+
- - "~>"
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0.6'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
|
-
- - ~>
|
108
|
+
- - "~>"
|
123
109
|
- !ruby/object:Gem::Version
|
124
110
|
version: '0.6'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: awesome_print
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
|
-
- -
|
115
|
+
- - ">="
|
130
116
|
- !ruby/object:Gem::Version
|
131
117
|
version: '0'
|
132
118
|
type: :development
|
133
119
|
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
|
-
- -
|
122
|
+
- - ">="
|
137
123
|
- !ruby/object:Gem::Version
|
138
124
|
version: '0'
|
139
|
-
description:
|
125
|
+
description: CAS Strategy for OmniAuth
|
140
126
|
email:
|
141
127
|
- dlindahl@customink.com
|
142
128
|
executables: []
|
143
129
|
extensions: []
|
144
130
|
extra_rdoc_files: []
|
145
131
|
files:
|
146
|
-
- .
|
147
|
-
- .
|
148
|
-
- .
|
132
|
+
- ".editorconfig"
|
133
|
+
- ".gitignore"
|
134
|
+
- ".ruby-version"
|
135
|
+
- ".travis.yml"
|
149
136
|
- Gemfile
|
150
|
-
- History.md
|
151
137
|
- LICENSE
|
152
138
|
- README.md
|
153
139
|
- Rakefile
|
@@ -155,12 +141,13 @@ files:
|
|
155
141
|
- lib/omniauth/cas.rb
|
156
142
|
- lib/omniauth/cas/version.rb
|
157
143
|
- lib/omniauth/strategies/cas.rb
|
158
|
-
- lib/omniauth/strategies/cas/
|
144
|
+
- lib/omniauth/strategies/cas/logout_request.rb
|
159
145
|
- lib/omniauth/strategies/cas/service_ticket_validator.rb
|
160
146
|
- omniauth-cas.gemspec
|
161
147
|
- spec/fixtures/cas_failure.xml
|
162
148
|
- spec/fixtures/cas_success.xml
|
163
|
-
- spec/
|
149
|
+
- spec/fixtures/cas_success_jasig.xml
|
150
|
+
- spec/omniauth/strategies/cas/logout_request_spec.rb
|
164
151
|
- spec/omniauth/strategies/cas/service_ticket_validator_spec.rb
|
165
152
|
- spec/omniauth/strategies/cas_spec.rb
|
166
153
|
- spec/spec_helper.rb
|
@@ -173,24 +160,25 @@ require_paths:
|
|
173
160
|
- lib
|
174
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
175
162
|
requirements:
|
176
|
-
- -
|
163
|
+
- - ">="
|
177
164
|
- !ruby/object:Gem::Version
|
178
165
|
version: '0'
|
179
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
167
|
requirements:
|
181
|
-
- -
|
168
|
+
- - ">"
|
182
169
|
- !ruby/object:Gem::Version
|
183
170
|
version: 1.3.1
|
184
171
|
requirements: []
|
185
172
|
rubyforge_project:
|
186
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.2.2
|
187
174
|
signing_key:
|
188
175
|
specification_version: 4
|
189
176
|
summary: CAS Strategy for OmniAuth
|
190
177
|
test_files:
|
191
178
|
- spec/fixtures/cas_failure.xml
|
192
179
|
- spec/fixtures/cas_success.xml
|
193
|
-
- spec/
|
180
|
+
- spec/fixtures/cas_success_jasig.xml
|
181
|
+
- spec/omniauth/strategies/cas/logout_request_spec.rb
|
194
182
|
- spec/omniauth/strategies/cas/service_ticket_validator_spec.rb
|
195
183
|
- spec/omniauth/strategies/cas_spec.rb
|
196
184
|
- spec/spec_helper.rb
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm --create use ruby-1.9.3-p194@omniauth-cas > /dev/null
|
data/History.md
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
|
2
|
-
0.0.7 / 2012-05-04
|
3
|
-
==================
|
4
|
-
|
5
|
-
* Version bump to 0.0.7
|
6
|
-
* Updated RSpec
|
7
|
-
* Updated SimpleCov
|
8
|
-
* Updated WebMock
|
9
|
-
* Updated Bourne
|
10
|
-
* Updated OmniAuth to 1.1.0
|
11
|
-
* Added language hint for code example.
|
12
|
-
* Updated the Travis/Gemnasium status graphics to work better with DocumentUp.
|
13
|
-
* Wow... commit fail.
|
14
|
-
* Added History/Changelog
|
15
|
-
|
16
|
-
0.0.6 / 2012-03-07
|
17
|
-
==================
|
18
|
-
|
19
|
-
* Updated 'webmock' gem dependency
|
20
|
-
* Update 'bourne' gem dependency
|
21
|
-
* Updated 'simplecov' gem dependency.
|
22
|
-
|
23
|
-
0.0.5 / 2012-02-10
|
24
|
-
==================
|
25
|
-
|
26
|
-
* Version bump to 0.0.5
|
27
|
-
* Refactored Pull Request #4 to make the CA Path configurable and added a test.
|
28
|
-
* Merge pull request #4 from dynaum/master
|
29
|
-
* Configuring ssl certs path for ubuntu
|
30
|
-
* Added chnage log
|
31
|
-
* Updated README
|
32
|
-
|
33
|
-
0.0.4 / 2012-01-24
|
34
|
-
==================
|
35
|
-
|
36
|
-
* Version bump to 0.0.4
|
37
|
-
* Fixed Issue #3 - Corrected some improperly placed URL-encoding.
|
38
|
-
* Added Gemnasium dependency monitor graphic
|
39
|
-
* Updated OmniAuth dependency to 1.0.2 to get rid of a Rack bug.
|
40
|
-
* Only CI the master branch.
|
41
|
-
* Removed a debugging RSpec tag.
|
42
|
-
* Removed extraneous whitespace
|
43
|
-
* Corrected some formatting issues with the README
|
44
|
-
* Small change to the README
|
45
|
-
|
46
|
-
0.0.3 / 2012-01-12
|
47
|
-
==================
|
48
|
-
|
49
|
-
* Version bump to 0.0.3
|
50
|
-
* Upgraded RSpec to 2.8
|
51
|
-
* Fixed #2 - Removed an undeclared dependency left in from debugging.
|
52
|
-
|
53
|
-
0.0.2 / 2012-01-03
|
54
|
-
==================
|
55
|
-
|
56
|
-
* Version bump to 0.0.2
|
57
|
-
* Fixed #1 - The return URL can now be explicitly set, falling back to the `referrer` if absent.
|
58
|
-
* Added some brief usage guidelines to the README
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module OmniAuth
|
2
|
-
module Strategies
|
3
|
-
class CAS
|
4
|
-
class Configuration
|
5
|
-
|
6
|
-
def initialize( options )
|
7
|
-
@options = options
|
8
|
-
|
9
|
-
extract_url if @options['url']
|
10
|
-
|
11
|
-
validate_cas_setup
|
12
|
-
end
|
13
|
-
|
14
|
-
def extract_url
|
15
|
-
url = Addressable::URI.parse( @options.delete('url') )
|
16
|
-
|
17
|
-
@options.merge!(
|
18
|
-
'host' => url.host,
|
19
|
-
'port' => url.port,
|
20
|
-
'path' => url.path,
|
21
|
-
'ssl' => url.scheme == 'https'
|
22
|
-
)
|
23
|
-
end
|
24
|
-
|
25
|
-
def validate_cas_setup
|
26
|
-
if @options.host.nil? || @options.login_url.nil?
|
27
|
-
raise ArgumentError.new(":host and :login_url MUST be provided")
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe OmniAuth::Strategies::CAS::Configuration do
|
4
|
-
subject { described_class.new }
|
5
|
-
|
6
|
-
let(:options) { Hashie::Mash.new params }
|
7
|
-
|
8
|
-
let(:params) do
|
9
|
-
{
|
10
|
-
'host' => 'example.org',
|
11
|
-
'login_url' => '/'
|
12
|
-
}
|
13
|
-
end
|
14
|
-
|
15
|
-
describe '#initialize' do
|
16
|
-
let(:params) do
|
17
|
-
{
|
18
|
-
'url' => 'http://example.org:8080/my_cas',
|
19
|
-
'login_url' => '/'
|
20
|
-
}
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'should initialize the configuration' do
|
24
|
-
described_class.any_instance.should_receive(:extract_url)
|
25
|
-
described_class.any_instance.should_receive(:validate_cas_setup)
|
26
|
-
|
27
|
-
described_class.new options
|
28
|
-
end
|
29
|
-
|
30
|
-
context 'with a URL property' do
|
31
|
-
subject { described_class.new( options ).instance_variable_get('@options') }
|
32
|
-
|
33
|
-
it 'should parse the URL' do
|
34
|
-
subject.host.should eq 'example.org'
|
35
|
-
subject.port.should eq 8080
|
36
|
-
subject.path.should eq '/my_cas'
|
37
|
-
subject.ssl.should be_false
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
context 'without a URL property' do
|
42
|
-
let(:params) do
|
43
|
-
{
|
44
|
-
'host' => 'example.org',
|
45
|
-
'login_url' => '/'
|
46
|
-
}
|
47
|
-
end
|
48
|
-
|
49
|
-
subject { described_class.new( options ) }
|
50
|
-
|
51
|
-
it 'should not parse the url' do
|
52
|
-
described_class.any_instance
|
53
|
-
.should_receive(:extract_url)
|
54
|
-
.never
|
55
|
-
|
56
|
-
described_class.new options
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|