federated_rails 0.2.2 → 0.3.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 +4 -4
- data/Gemfile +4 -9
- data/Rakefile +1 -1
- data/config/routes.rb +6 -6
- data/lib/federated_rails/development_strategy.rb +2 -2
- data/lib/federated_rails/federation_strategy.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34b127201d131d700ffed67c41536e26b93ed647
|
4
|
+
data.tar.gz: 33d6ac74157c47419c0e0af8d852a9de92b784b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7244401296f9dfaa5f6a2163b09954625faafc301c12f0dbcbe6c6b1e0743bf9ff75b2427fd3ed82c73a9dab88fcec0d6c1ea0db4cf1c66330abdab256c436c
|
7
|
+
data.tar.gz: 46bbaec3effbd2d235c43622ce4247a644b0deaf238de823bdb9b53e1e73c77cc1f4159f424d26c00acd96103abf30522c3672f79c072fa66b1a5401821ea402
|
data/Gemfile
CHANGED
@@ -1,16 +1,11 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
|
3
|
-
gem "rails", "
|
3
|
+
gem "rails", "4.0.2"
|
4
4
|
gem "sqlite3"
|
5
5
|
|
6
|
-
gem "rails_warden"
|
7
|
-
|
8
|
-
group :development do
|
9
|
-
gem "bundler", "~> 1.0.0"
|
10
|
-
gem "rcov", ">= 0"
|
11
|
-
end
|
6
|
+
gem "rails_warden"
|
12
7
|
|
13
8
|
group :test, :development do
|
14
|
-
gem "rspec-rails"
|
15
|
-
gem "factory_girl_rails"
|
9
|
+
gem "rspec-rails"
|
10
|
+
gem "factory_girl_rails"
|
16
11
|
end
|
data/Rakefile
CHANGED
data/config/routes.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
2
|
|
3
3
|
scope :module => 'federated_rails' do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
get '/login', :to => 'auth#login', :as => :login
|
5
|
+
get '/logout', :to => 'auth#logout', :as => :logout
|
6
|
+
get '/loginerror', :to => 'auth#unauthenticated'
|
7
|
+
get '/auth/federation', :to => 'auth#federation_login'
|
8
|
+
get '/auth/development', :to => 'auth#development_login'
|
9
9
|
end
|
10
10
|
|
11
|
-
end
|
11
|
+
end
|
@@ -19,7 +19,7 @@ module FederatedRails
|
|
19
19
|
return fail! 'Authentication Error - Development environment did not supply session ID'
|
20
20
|
end
|
21
21
|
|
22
|
-
subject = host_subject.
|
22
|
+
subject = host_subject.find_or_initialize_by(principal: params[:principal])
|
23
23
|
|
24
24
|
if subject.new_record?
|
25
25
|
unless Rails.application.config.federation.autoprovision
|
@@ -61,4 +61,4 @@ module FederatedRails
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
64
|
-
end
|
64
|
+
end
|
@@ -20,7 +20,7 @@ class FederatedRails::FederationStrategy < Warden::Strategies::Base
|
|
20
20
|
return fail! 'Authentication Error - Federation did not supply session ID'
|
21
21
|
end
|
22
22
|
|
23
|
-
subject = host_subject.
|
23
|
+
subject = host_subject.find_or_initialize_by(principal: principal)
|
24
24
|
|
25
25
|
if subject.new_record?
|
26
26
|
unless Rails.application.config.federation.autoprovision
|