gds-sso 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,15 @@
1
1
  class AuthenticationsController < ApplicationController
2
2
  before_filter :authenticate_user!, :only => :callback
3
+ layout false, :only => :callback
3
4
 
4
5
  def callback
5
6
  redirect_to session["return_to"] || '/'
6
7
  end
7
8
 
9
+ def failure
10
+
11
+ end
12
+
8
13
  def sign_out
9
14
  cookie_key = Rails.application.config.session_options[:key]
10
15
  cookies.delete(cookie_key)
@@ -0,0 +1,3 @@
1
+ <h1>Error</h1>
2
+
3
+ <p>There was a problem logging you into the application. Please <%= link_to "try again", "/auth/gds" %>.</p>
data/config/routes.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
  match '/auth/gds/callback', to: 'authentications#callback', as: :gds_sign_in
3
3
  match '/auth/gds/sign_out', to: 'authentications#sign_out', as: :gds_sign_out
4
+ match '/auth/failure', to: 'authentications#failure', as: :auth_failure
4
5
  end
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  end
data/lib/gds-sso.rb CHANGED
@@ -35,8 +35,6 @@ module GDS
35
35
  use_mock_strategies? ? [:mock_gds_sso, :mock_gds_sso_api_access] : [:gds_sso, :gds_sso_api_access]
36
36
  end
37
37
 
38
- puts "Loading Warden!"
39
-
40
38
  config.app_middleware.use Warden::Manager do |config|
41
39
  config.default_strategies *self.default_strategies
42
40
  config.failure_app = GDS::SSO::FailureApp
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gds-sso
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.1
5
+ version: 0.5.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Matt Patterson
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2012-04-24 00:00:00 Z
14
+ date: 2012-04-26 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -168,6 +168,7 @@ extra_rdoc_files: []
168
168
 
169
169
  files:
170
170
  - app/controllers/authentications_controller.rb
171
+ - app/views/authentications/failure.html.erb
171
172
  - config/routes.rb
172
173
  - lib/gds-sso/api_access.rb
173
174
  - lib/gds-sso/config.rb
@@ -216,7 +217,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
217
  requirements:
217
218
  - - ">="
218
219
  - !ruby/object:Gem::Version
219
- hash: -1832840277119493135
220
+ hash: -3590518853034987853
220
221
  segments:
221
222
  - 0
222
223
  version: "0"
@@ -225,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
226
  requirements:
226
227
  - - ">="
227
228
  - !ruby/object:Gem::Version
228
- hash: -1832840277119493135
229
+ hash: -3590518853034987853
229
230
  segments:
230
231
  - 0
231
232
  version: "0"