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 +4 -4
- data/Rakefile +3 -0
- data/app/controllers/nulogy_sso/authentication_controller.rb +3 -3
- data/lib/nulogy_sso/version.rb +1 -1
- data/lib/nulogy_sso.rb +1 -1
- data/spec/dummy/config/application.rb +0 -5
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +12 -26
- data/spec/dummy/log/test.log +185 -1073
- data/spec/dummy/tmp/local_secret.txt +1 -0
- data/spec/examples.txt +24 -24
- metadata +51 -25
- data/spec/dummy/db/test.sqlite3-journal +0 -0
- data/spec/dummy/tmp/development_secret.txt +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 810c9823ed0e49c273e814699a784e5280d4a52e48c4ccd82dd424cf38ad8912
|
4
|
+
data.tar.gz: c911aaac0f3755c392214ac800210fe65f60841f37a8b13cc9c851206f572fff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e75ece84b7f7b661467c2dd697f8a80ad51efc81f55272c854d8bb934694fe85dc3da3de45d8b7e02dfca0111820af456b907f9eb0409df2da131b080caa6f43
|
7
|
+
data.tar.gz: 44ad58428c6962ff6378e34ea3dc1179427dbd4cb77ce761288624dc5385a7fad1553c25327411619cca9f1d3f68b27b0aa9bee8525635065b67f1a193e0bd00
|
data/Rakefile
CHANGED
@@ -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
|
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)
|
data/lib/nulogy_sso/version.rb
CHANGED
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
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1,26 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
(
|
9
|
-
[1m[
|
10
|
-
[1m[
|
11
|
-
[1m[
|
12
|
-
[1m[36mActiveRecord::
|
13
|
-
[1m[35m (1.3ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20190912211120)[0m
|
14
|
-
[1m[35m (1.6ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
|
15
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
16
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
17
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.4ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2022-09-21 20:45:16.920513"], ["updated_at", "2022-09-21 20:45:16.920513"]]
|
18
|
-
[1m[36mTRANSACTION (1.2ms)[0m [1m[36mcommit transaction[0m
|
19
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
20
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
21
|
-
[1m[36mActiveRecord::InternalMetadata Update (0.4ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ?[0m [["value", "test"], ["updated_at", "2022-09-21 20:45:16.926395"], ["key", "environment"]]
|
22
|
-
[1m[36mTRANSACTION (1.0ms)[0m [1m[36mcommit transaction[0m
|
23
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
24
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
25
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.5ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "schema_sha1"], ["value", "2b01fa59c4c74162736a2cb624389712cfa71fdb"], ["created_at", "2022-09-21 20:45:16.931739"], ["updated_at", "2022-09-21 20:45:16.931739"]]
|
26
|
-
[1m[36mTRANSACTION (1.3ms)[0m [1m[36mcommit transaction[0m
|
1
|
+
[1m[35m (0.7ms)[0m [1m[35mDROP TABLE IF EXISTS "users"[0m
|
2
|
+
[1m[35m (0.7ms)[0m [1m[35mCREATE 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)[0m
|
3
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
4
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
5
|
+
[1m[35m (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20190912211120)[0m
|
6
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
|
7
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1[0m [[nil, "environment"]]
|
8
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.3ms)[0m [1m[32mINSERT 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"[0m
|
9
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1[0m [[nil, "environment"]]
|
10
|
+
[1m[36mActiveRecord::InternalMetadata Update (0.2ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2024-12-30 15:43:21.541149' WHERE "ar_internal_metadata"."key" = 'environment'[0m
|
11
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1[0m [[nil, "schema_sha1"]]
|
12
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.3ms)[0m [1m[32mINSERT 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"[0m
|