gds-sso 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  class AuthenticationsController < ApplicationController
2
2
  before_filter :authenticate_user!, :only => :callback
3
+ skip_before_filter :require_signin_permission!
3
4
  layout false, :only => :callback
4
5
 
5
6
  def callback
@@ -1,3 +1,6 @@
1
- <h1>Error</h1>
1
+ <h1>Sorry, you don't have permission to access this application</h1>
2
+
3
+ <p>Please contact your Delivery Manager or main GDS contact if you need access.</p>
4
+
5
+ <p>If you think something is wrong, try <%= link_to "signing out", gds_sign_out_path %> and then back in</p>
2
6
 
3
- <p>ACCESS DENIED!</p>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ </head>
5
+ <body>
6
+ <div id="container">
7
+ <%= yield %>
8
+ </div>
9
+ <div id="footer" class="cf">
10
+ &copy; <%= Date.today.year %> <a href="http://digital.cabinetoffice.gov.uk/"><abbr title="Government Digital Service">GDS</abbr></a>.
11
+ </div>
12
+ </body>
13
+ </html>
@@ -13,7 +13,7 @@ module GDS
13
13
  def require_signin_permission!
14
14
  authorise_user!(GDS::SSO::Config.default_scope, 'signin')
15
15
  rescue PermissionDeniedException
16
- redirect_to cant_signin_url
16
+ render "authorisations/cant_signin", layout: "unauthorised", status: :forbidden
17
17
  end
18
18
 
19
19
  def authenticate_user!
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "0.7.1"
3
+ VERSION = "0.7.2"
4
4
  end
5
5
  end
@@ -2229,3 +2229,87 @@ Started GET "/restricted" for 127.0.0.1 at 2012-06-26 13:23:10 +0000
2229
2229
  Processing by ExampleController#restricted as JSON
2230
2230
  Authenticating with gds_sso_api_access strategy
2231
2231
  Completed 200 OK in 1ms (Views: 0.6ms)
2232
+
2233
+
2234
+ Started GET "/" for 127.0.0.1 at 2012-06-27 11:13:49 +0000
2235
+ Processing by ExampleController#index as HTML
2236
+ Rendered text template (0.0ms)
2237
+ Completed 200 OK in 142ms (Views: 141.8ms)
2238
+
2239
+
2240
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 11:13:49 +0000
2241
+ Processing by ExampleController#restricted as HTML
2242
+ Authenticating with gds_sso strategy
2243
+ Completed in 58ms
2244
+
2245
+
2246
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-27 11:13:49 +0000
2247
+
2248
+
2249
+ Started GET "/auth/gds/callback?code=38c6912e33d6e5a6a76f0077ec9b1842bdcc624a135025d25a87fe7fe2e011b0" for 127.0.0.1 at 2012-06-27 11:13:51 +0000
2250
+ Processing by AuthenticationsController#callback as HTML
2251
+ Parameters: {"code"=>"38c6912e33d6e5a6a76f0077ec9b1842bdcc624a135025d25a87fe7fe2e011b0"}
2252
+ Authenticating with gds_sso strategy
2253
+ Redirected to http://www.example-client.com/restricted
2254
+ Completed 302 Found in 1ms
2255
+
2256
+
2257
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 11:13:51 +0000
2258
+ Processing by ExampleController#restricted as HTML
2259
+ Completed 200 OK in 1ms (Views: 0.5ms)
2260
+
2261
+
2262
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 11:13:51 +0000
2263
+ Processing by ExampleController#restricted as HTML
2264
+ Authenticating with gds_sso strategy
2265
+ Completed in 1ms
2266
+
2267
+
2268
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-27 11:13:51 +0000
2269
+
2270
+
2271
+ Started GET "/auth/gds/callback?code=c59fe1c052db61cdbba0a0ed514b7913e2cd5996d189a88097101b39ae1a3312" for 127.0.0.1 at 2012-06-27 11:13:52 +0000
2272
+ Processing by AuthenticationsController#callback as HTML
2273
+ Parameters: {"code"=>"c59fe1c052db61cdbba0a0ed514b7913e2cd5996d189a88097101b39ae1a3312"}
2274
+ Authenticating with gds_sso strategy
2275
+ Redirected to http://www.example-client.com/restricted
2276
+ Completed 302 Found in 1ms
2277
+
2278
+
2279
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 11:13:52 +0000
2280
+ Processing by ExampleController#restricted as HTML
2281
+ Completed 200 OK in 1ms (Views: 0.5ms)
2282
+
2283
+
2284
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 11:13:52 +0000
2285
+ Processing by ExampleController#restricted as HTML
2286
+ Authenticating with gds_sso strategy
2287
+ Completed in 0ms
2288
+
2289
+
2290
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-27 11:13:52 +0000
2291
+
2292
+
2293
+ Started GET "/auth/gds/callback?code=b6e2a45a83386cfa408531081d07f6f583dd57a21c45c1d795d7453daf1bf4ff" for 127.0.0.1 at 2012-06-27 11:13:52 +0000
2294
+ Processing by AuthenticationsController#callback as HTML
2295
+ Parameters: {"code"=>"b6e2a45a83386cfa408531081d07f6f583dd57a21c45c1d795d7453daf1bf4ff"}
2296
+ Authenticating with gds_sso strategy
2297
+ Redirected to http://www.example-client.com/restricted
2298
+ Completed 302 Found in 1ms
2299
+
2300
+
2301
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 11:13:52 +0000
2302
+ Processing by ExampleController#restricted as HTML
2303
+ Completed 200 OK in 1ms (Views: 0.3ms)
2304
+
2305
+
2306
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 11:13:52 +0000
2307
+ Processing by ExampleController#restricted as JSON
2308
+ Authenticating with gds_sso_api_access strategy
2309
+ Completed in 148ms
2310
+
2311
+
2312
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 11:13:52 +0000
2313
+ Processing by ExampleController#restricted as JSON
2314
+ Authenticating with gds_sso_api_access strategy
2315
+ Completed 200 OK in 1ms (Views: 0.5ms)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gds-sso
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.7.1
5
+ version: 0.7.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-06-26 00:00:00 Z
14
+ date: 2012-06-27 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -156,10 +156,10 @@ extensions: []
156
156
  extra_rdoc_files: []
157
157
 
158
158
  files:
159
+ - app/views/layouts/unauthorised.html.erb
159
160
  - app/views/authentications/failure.html.erb
160
161
  - app/views/authorisations/cant_signin.html.erb
161
162
  - app/controllers/authentications_controller.rb
162
- - app/controllers/authorisations_controller.rb
163
163
  - config/routes.rb
164
164
  - lib/gds-sso.rb
165
165
  - lib/gds-sso/controller_methods.rb
@@ -204,7 +204,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
204
204
  requirements:
205
205
  - - ">="
206
206
  - !ruby/object:Gem::Version
207
- hash: 2322992510132957639
207
+ hash: 4011251508422337613
208
208
  segments:
209
209
  - 0
210
210
  version: "0"
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  requirements:
214
214
  - - ">="
215
215
  - !ruby/object:Gem::Version
216
- hash: 2322992510132957639
216
+ hash: 4011251508422337613
217
217
  segments:
218
218
  - 0
219
219
  version: "0"
@@ -1,4 +0,0 @@
1
- class AuthorisationsController < ApplicationController
2
- def cant_signin
3
- end
4
- end