nulogy_sso 2.5.0 → 2.6.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: aa5aea3ea95e75844f94fc702a9cac1096135c9896460f0acac40c2b736d2442
4
- data.tar.gz: 936d70656621ecc40e47e8f0f70347753d9662a04584482e68c6ab53db55d383
3
+ metadata.gz: 810c9823ed0e49c273e814699a784e5280d4a52e48c4ccd82dd424cf38ad8912
4
+ data.tar.gz: c911aaac0f3755c392214ac800210fe65f60841f37a8b13cc9c851206f572fff
5
5
  SHA512:
6
- metadata.gz: 8aed5b7156f238dc974af4c7e3dfa34e08fe2f60e650aec4f072ae1a227f14b05b1c13b674ad7e6a686572804095df8a51545b651991d5b8e5ccc3f3a97260a8
7
- data.tar.gz: 7647f9d1944d5cedf9eb6d79e503c8ee1a3f873d9bcaa507d6fe27c54ee032bcc1fcb6c380c75a517dc4bb477cecf2f8830d214f7610e24a415f0dad8060dc23
6
+ metadata.gz: e75ece84b7f7b661467c2dd697f8a80ad51efc81f55272c854d8bb934694fe85dc3da3de45d8b7e02dfca0111820af456b907f9eb0409df2da131b080caa6f43
7
+ data.tar.gz: 44ad58428c6962ff6378e34ea3dc1179427dbd4cb77ce761288624dc5385a7fad1553c25327411619cca9f1d3f68b27b0aa9bee8525635065b67f1a193e0bd00
data/Rakefile CHANGED
@@ -20,3 +20,6 @@ load "rails/tasks/engine.rake"
20
20
  load "rails/tasks/statistics.rake"
21
21
 
22
22
  require "bundler/gem_tasks"
23
+
24
+ require 'rspec/core/rake_task'
25
+ RSpec::Core::RakeTask.new(:spec)
@@ -21,7 +21,7 @@ module NulogySSO
21
21
  authenticator.validate_token(
22
22
  raw_access_token,
23
23
  on_success: method(:on_authentication_success),
24
- on_invalid_token: ->(_e) { redirect_to auth0_authorize_path }
24
+ on_invalid_token: ->(_e) { redirect_to auth0_authorize_path, allow_other_host: true }
25
25
  )
26
26
  end
27
27
 
@@ -47,7 +47,7 @@ module NulogySSO
47
47
  returnTo: sso_config.redirect_uri, # Yes, this must be camelCased
48
48
  client_id: sso_config.client_id
49
49
  }
50
- redirect_to "#{sso_config.base_uri}/v2/logout?#{query_params.to_query}"
50
+ redirect_to "#{sso_config.base_uri}/v2/logout?#{query_params.to_query}", allow_other_host: true
51
51
  end
52
52
 
53
53
  private
@@ -69,7 +69,7 @@ module NulogySSO
69
69
  def on_authentication_success(access_token)
70
70
  token_store.store!(access_token)
71
71
 
72
- redirect_to params["origin"].presence || sso_config.redirect_uri
72
+ redirect_to(params["origin"].presence || sso_config.redirect_uri, allow_other_host: true)
73
73
  end
74
74
 
75
75
  def fetch_token_from_auth0(code)
@@ -1,3 +1,3 @@
1
1
  module NulogySSO
2
- VERSION = "2.5.0"
2
+ VERSION = "2.6.0"
3
3
  end
data/lib/nulogy_sso.rb CHANGED
@@ -6,7 +6,7 @@ module NulogySSO
6
6
  # Config variables for the engine
7
7
  mattr_accessor :sso_config, :find_user_by_email, :handle_sso_error
8
8
  mattr_accessor :handle_unauthenticated_request, default: lambda { |controller|
9
- controller.redirect_to NulogySSO::Engine.routes.url_helpers.login_path
9
+ controller.redirect_to NulogySSO::Engine.routes.url_helpers.login_path, allow_other_host: true
10
10
  }
11
11
 
12
12
  # Public Constants
@@ -15,10 +15,6 @@ require "action_cable/engine"
15
15
 
16
16
  Bundler.require(*Rails.groups)
17
17
 
18
- # Manual loading of dotenv is necessary
19
- require "dotenv/rails"
20
- Dotenv::Railtie.load
21
-
22
18
  require "nulogy_sso"
23
19
 
24
20
  module Dummy
@@ -38,4 +34,3 @@ module Dummy
38
34
  NulogySSO.handle_sso_error = ->(controller:, **) { controller.render plain: "An SSO error has occurred :(" }
39
35
  end
40
36
  end
41
-
Binary file
Binary file
@@ -1,26 +1,12 @@
1
- DEPRECATION WARNING: Using legacy connection handling is deprecated. Please set
2
- `legacy_connection_handling` to `false` in your application.
3
-
4
- The new connection handling does not support `connection_handlers`
5
- getter and setter.
6
-
7
- Read more about how to migrate at: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
8
- (called from block in execute at /Users/jasony/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281)
9
-  (0.1ms) DROP TABLE IF EXISTS "users"
10
-  (1.8ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "active" boolean DEFAULT 0 NOT NULL, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
11
-  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
12
- ActiveRecord::SchemaMigration Pluck (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
13
-  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES (20190912211120)
14
-  (1.6ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
15
- ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
16
- TRANSACTION (0.1ms) begin transaction
17
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2022-09-21 20:45:16.920513"], ["updated_at", "2022-09-21 20:45:16.920513"]]
18
- TRANSACTION (1.2ms) commit transaction
19
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
20
- TRANSACTION (0.0ms) begin transaction
21
- ActiveRecord::InternalMetadata Update (0.4ms) UPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ? [["value", "test"], ["updated_at", "2022-09-21 20:45:16.926395"], ["key", "environment"]]
22
- TRANSACTION (1.0ms) commit transaction
23
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "schema_sha1"], ["LIMIT", 1]]
24
- TRANSACTION (0.0ms) begin transaction
25
- ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "schema_sha1"], ["value", "2b01fa59c4c74162736a2cb624389712cfa71fdb"], ["created_at", "2022-09-21 20:45:16.931739"], ["updated_at", "2022-09-21 20:45:16.931739"]]
26
- TRANSACTION (1.3ms) commit transaction
1
+  (0.7ms) DROP TABLE IF EXISTS "users"
2
+  (0.7ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "active" boolean DEFAULT 0 NOT NULL, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
3
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
4
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
5
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES (20190912211120)
6
+  (0.2ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
7
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 [[nil, "environment"]]
8
+ ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2024-12-30 15:43:21.538370', '2024-12-30 15:43:21.538373') RETURNING "key"
9
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 [[nil, "environment"]]
10
+ ActiveRecord::InternalMetadata Update (0.2ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2024-12-30 15:43:21.541149' WHERE "ar_internal_metadata"."key" = 'environment'
11
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 [[nil, "schema_sha1"]]
12
+ ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '2b01fa59c4c74162736a2cb624389712cfa71fdb', '2024-12-30 15:43:21.543796', '2024-12-30 15:43:21.543798') RETURNING "key"