rails_sso 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -7
- data/lib/rails_sso/app.rb +6 -6
- data/lib/rails_sso/engine.rb +1 -1
- data/lib/rails_sso/failure_app.rb +7 -1
- data/lib/rails_sso/version.rb +1 -1
- data/lib/rails_sso.rb +16 -2
- data/test/dummy/log/test.log +1242 -0
- data/test/lib/rails_sso/failure_app_test.rb +12 -1
- metadata +16 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class RailsSso::FailureAppTest < ActiveSupport::TestCase
|
4
|
-
test "
|
4
|
+
test "regular call runs respond action and redirects to sso" do
|
5
5
|
env = {
|
6
6
|
'REQUEST_URI' => 'http://test.host',
|
7
7
|
'HTTP_HOST' => 'test.host'
|
@@ -11,4 +11,15 @@ class RailsSso::FailureAppTest < ActiveSupport::TestCase
|
|
11
11
|
assert_equal 302, response.first
|
12
12
|
assert_equal 'http://test.host/sso/', response.second['Location']
|
13
13
|
end
|
14
|
+
|
15
|
+
test "json call runs respond action and renders 401" do
|
16
|
+
env = {
|
17
|
+
'REQUEST_URI' => 'http://test.host',
|
18
|
+
'HTTP_HOST' => 'test.host',
|
19
|
+
'CONTENT_TYPE' => 'application/json'
|
20
|
+
}
|
21
|
+
response = RailsSso::FailureApp.call(env).to_a
|
22
|
+
|
23
|
+
assert_equal 401, response.first
|
24
|
+
end
|
14
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Dudulski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
description: Single Sign On solution via OAuth2 for Ruby on Rails.
|
112
126
|
email:
|
113
127
|
- jan@dudulski.pl
|