gds-sso 16.0.0 → 16.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 911e1ecb0d2e34bd5f8e8709c2f30c3cbe7a6c41e414471e6a0e05551bfed011
4
- data.tar.gz: 9d5f275d870a44a01249602b94d913b072e1dcb70683bcc9a967dbb32918eab3
3
+ metadata.gz: 68d52bff4bfbb14f4bbf15b0cb1a50aa3e0a7dc2c5bb878fac313f7d5d2d5176
4
+ data.tar.gz: 00a89b7a401bb7fa4f5378522eac3248757dcab45b6c078d5e55e71f08638c8d
5
5
  SHA512:
6
- metadata.gz: 01cb316219c04abae1b187eed25de5c89c4eba5e1d9630e63fc02aaef89a0345740d02555c045f97ee4f5c35f733cd17c4c0d5b0d88bcd2874543370d10af09c
7
- data.tar.gz: e9eab59c8d961842d1d9fe6c2719d628590ac486609928a3126df815f1f6846691b220f688859a5db6a3bfb3201e12aab4727afb1f74981f958e0e61fd86d222
6
+ metadata.gz: 1b806fd8e9dc753b82e1064798693241f9e9f573d4ab76def2f24af754a1399f517891fadb0cd709a2491da41a9377958378daaf5d00b82e5bd80aa031c9ffc3
7
+ data.tar.gz: 5512a069b49a307da70325f56751b382394269eaf2ca2ed21d2802684f9e860e5f2b2b92ddf0cb008984622dd8225b78a74d838c2c4b35e63a64cf2792cfe765
@@ -12,6 +12,6 @@ class AuthenticationsController < ActionController::Base
12
12
 
13
13
  def sign_out
14
14
  logout
15
- redirect_to GDS::SSO::Config.oauth_root_url + "/users/sign_out"
15
+ redirect_to "#{GDS::SSO::Config.oauth_root_url}/users/sign_out", allow_other_host: true
16
16
  end
17
17
  end
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "16.0.0".freeze
3
+ VERSION = "16.1.0".freeze
4
4
  end
5
5
  end
data/lib/gds-sso.rb CHANGED
@@ -27,6 +27,8 @@ module GDS
27
27
  # TODO - check this one - Stolen from Devise because it looked sensible...
28
28
  config.before_eager_load(&:reload_routes!)
29
29
 
30
+ OmniAuth.config.allowed_request_methods = %i[post get]
31
+
30
32
  config.app_middleware.use ::OmniAuth::Builder do
31
33
  next if GDS::SSO::Config.api_only
32
34
 
@@ -1,20 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe GDS::SSO::ControllerMethods, "#authorise_user!" do
4
- class ControllerSpy < ApplicationController
5
- include GDS::SSO::ControllerMethods
6
-
7
- def initialize(current_user)
8
- @current_user = current_user
9
- end
10
-
11
- def authenticate_user!
12
- true
13
- end
14
-
15
- attr_reader :current_user
16
- end
17
-
18
4
  let(:current_user) { double }
19
5
  let(:expected_error) { GDS::SSO::ControllerMethods::PermissionDeniedException }
20
6
 
@@ -1,7 +1,7 @@
1
1
  DELETE FROM `oauth_access_tokens`;
2
2
 
3
3
  INSERT INTO oauth_access_tokens (resource_owner_id, application_id, token, refresh_token, expires_in, created_at)
4
- VALUES (1, 1, 'caaeb53be5c7277fb0ef158181bfd1537b57f9e3b83eb795be3cd0af6e118b28', '1bc343797483954d7306d67e96687feccdfdaa8b23ed662ae23e2b03e6661d16', 307584000, '2012-06-27 13:57:47');
4
+ VALUES (1, 1, 'caaeb53be5c7277fb0ef158181bfd1537b57f9e3b83eb795be3cd0af6e118b28', '1bc343797483954d7306d67e96687feccdfdaa8b23ed662ae23e2b03e6661d16', 30758400000, '2012-06-27 13:57:47');
5
5
 
6
6
  INSERT INTO oauth_access_tokens (resource_owner_id, application_id, token, refresh_token, expires_in, created_at)
7
- VALUES (1, 2, '98c72f4da02fdc43398e029d05567542944d2a9b0df3c20b0accd8bd6c5dc728', 'e2da0489a58219fd4f542139909737627874ceacd2af23f5c268ccecb36e85af', 307584000, '2014-07-14 09:06:14');
7
+ VALUES (1, 2, '98c72f4da02fdc43398e029d05567542944d2a9b0df3c20b0accd8bd6c5dc728', 'e2da0489a58219fd4f542139909737627874ceacd2af23f5c268ccecb36e85af', 30758400000, '2014-07-14 09:06:14');