gds-sso 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
data/lib/gds-sso/version.rb
CHANGED
@@ -9,7 +9,11 @@ Warden::Manager.after_authentication do |user, auth, opts|
|
|
9
9
|
end
|
10
10
|
|
11
11
|
Warden::Manager.serialize_into_session do |user|
|
12
|
-
user.respond_to?(:uid)
|
12
|
+
if user.respond_to?(:uid) and user.uid
|
13
|
+
[user.uid, Time.now.utc]
|
14
|
+
else
|
15
|
+
nil
|
16
|
+
end
|
13
17
|
end
|
14
18
|
|
15
19
|
Warden::Manager.serialize_from_session do |tuple|
|
Binary file
|
data/spec/internal/log/test.log
CHANGED
@@ -7518,3 +7518,457 @@ GDS_SSO integration test:
|
|
7518
7518
|
[1m[35m (9.5ms)[0m commit transaction
|
7519
7519
|
Completed 200 OK in 17ms (ActiveRecord: 10.3ms)
|
7520
7520
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 5]]
|
7521
|
+
Connecting to database specified by database.yml
|
7522
|
+
[1m[36m (3.5ms)[0m [1mselect sqlite_version(*)[0m
|
7523
|
+
[1m[35m (62.8ms)[0m DROP TABLE "users"
|
7524
|
+
[1m[36m (1.6ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text) [0m
|
7525
|
+
|
7526
|
+
|
7527
|
+
Started GET "/" for 127.0.0.1 at 2012-07-27 15:10:42 +0000
|
7528
|
+
Processing by ExampleController#index as HTML
|
7529
|
+
Rendered text template (0.0ms)
|
7530
|
+
Completed 200 OK in 136ms (Views: 135.4ms | ActiveRecord: 0.0ms)
|
7531
|
+
|
7532
|
+
|
7533
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:42 +0000
|
7534
|
+
Processing by ExampleController#restricted as HTML
|
7535
|
+
Authenticating with gds_sso strategy
|
7536
|
+
Completed in 75ms
|
7537
|
+
|
7538
|
+
|
7539
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:42 +0000
|
7540
|
+
|
7541
|
+
|
7542
|
+
Started GET "/auth/gds/callback?code=5fda799e1004a055583c4a7392d120610293e9f5fe569700b2d563b74b193041&state=552a88a68a8126086e2d6ce582e972f54dc687fa2957e42f" for 127.0.0.1 at 2012-07-27 15:10:44 +0000
|
7543
|
+
Processing by AuthenticationsController#callback as HTML
|
7544
|
+
Parameters: {"code"=>"5fda799e1004a055583c4a7392d120610293e9f5fe569700b2d563b74b193041", "state"=>"552a88a68a8126086e2d6ce582e972f54dc687fa2957e42f"}
|
7545
|
+
Authenticating with gds_sso strategy
|
7546
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7547
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7548
|
+
[1m[35mSQL (49.1ms)[0m INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["permissions", "--- \nGDS_SSO integration test: \n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]
|
7549
|
+
[1m[36m (4.6ms)[0m [1mcommit transaction[0m
|
7550
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7551
|
+
[1m[36m (0.4ms)[0m [1mUPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
|
7552
|
+
GDS_SSO integration test:
|
7553
|
+
- signin
|
7554
|
+
' WHERE "users"."id" = 1[0m
|
7555
|
+
[1m[35m (1.5ms)[0m commit transaction
|
7556
|
+
Redirected to http://www.example-client.com/restricted
|
7557
|
+
Completed 302 Found in 169ms (ActiveRecord: 56.5ms)
|
7558
|
+
|
7559
|
+
|
7560
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:44 +0000
|
7561
|
+
Processing by ExampleController#restricted as HTML
|
7562
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7563
|
+
Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)
|
7564
|
+
|
7565
|
+
|
7566
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:44 +0000
|
7567
|
+
Processing by ExampleController#restricted as HTML
|
7568
|
+
Authenticating with gds_sso strategy
|
7569
|
+
Completed in 1ms
|
7570
|
+
|
7571
|
+
|
7572
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:44 +0000
|
7573
|
+
|
7574
|
+
|
7575
|
+
Started GET "/auth/gds/callback?code=14237788eea7fe284033b3b2be1bde9204c0b149b575cbf6930a224f059d5cda&state=c6c7943a80419df08ba4498f68df075c53a42c61bbfd710a" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7576
|
+
Processing by AuthenticationsController#callback as HTML
|
7577
|
+
Parameters: {"code"=>"14237788eea7fe284033b3b2be1bde9204c0b149b575cbf6930a224f059d5cda", "state"=>"c6c7943a80419df08ba4498f68df075c53a42c61bbfd710a"}
|
7578
|
+
Authenticating with gds_sso strategy
|
7579
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7580
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7581
|
+
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
7582
|
+
GDS_SSO integration test:
|
7583
|
+
- signin
|
7584
|
+
' WHERE "users"."id" = 1
|
7585
|
+
[1m[36m (9.8ms)[0m [1mcommit transaction[0m
|
7586
|
+
[1m[35m (0.0ms)[0m begin transaction
|
7587
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7588
|
+
GDS_SSO integration test:
|
7589
|
+
- signin
|
7590
|
+
' WHERE "users"."id" = 1[0m
|
7591
|
+
[1m[35m (1.3ms)[0m commit transaction
|
7592
|
+
Redirected to http://www.example-client.com/restricted
|
7593
|
+
Completed 302 Found in 18ms (ActiveRecord: 12.0ms)
|
7594
|
+
|
7595
|
+
|
7596
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7597
|
+
Processing by ExampleController#restricted as HTML
|
7598
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7599
|
+
Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)
|
7600
|
+
|
7601
|
+
|
7602
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7603
|
+
Processing by ExampleController#restricted as HTML
|
7604
|
+
Authenticating with gds_sso strategy
|
7605
|
+
Completed in 0ms
|
7606
|
+
|
7607
|
+
|
7608
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7609
|
+
|
7610
|
+
|
7611
|
+
Started GET "/auth/gds/callback?code=5e9c0bcca9a6fd35e8f6a1e8d8a220dafb2d7f1a15078060437a32424931a59d&state=4ca349ed23ec67fcbb0c9f4fbe4f3e75f97d0edeb8e2240b" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7612
|
+
Processing by AuthenticationsController#callback as HTML
|
7613
|
+
Parameters: {"code"=>"5e9c0bcca9a6fd35e8f6a1e8d8a220dafb2d7f1a15078060437a32424931a59d", "state"=>"4ca349ed23ec67fcbb0c9f4fbe4f3e75f97d0edeb8e2240b"}
|
7614
|
+
Authenticating with gds_sso strategy
|
7615
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7616
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7617
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "permissions" = '---
|
7618
|
+
GDS_SSO integration test:
|
7619
|
+
- signin
|
7620
|
+
' WHERE "users"."id" = 1
|
7621
|
+
[1m[36m (10.1ms)[0m [1mcommit transaction[0m
|
7622
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7623
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7624
|
+
GDS_SSO integration test:
|
7625
|
+
- signin
|
7626
|
+
' WHERE "users"."id" = 1[0m
|
7627
|
+
[1m[35m (1.5ms)[0m commit transaction
|
7628
|
+
Redirected to http://www.example-client.com/restricted
|
7629
|
+
Completed 302 Found in 18ms (ActiveRecord: 12.5ms)
|
7630
|
+
|
7631
|
+
|
7632
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7633
|
+
Processing by ExampleController#restricted as HTML
|
7634
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7635
|
+
Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
7636
|
+
|
7637
|
+
|
7638
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7639
|
+
Processing by ExampleController#this_requires_signin_permission as HTML
|
7640
|
+
Authenticating with gds_sso strategy
|
7641
|
+
Completed in 1ms
|
7642
|
+
|
7643
|
+
|
7644
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7645
|
+
|
7646
|
+
|
7647
|
+
Started GET "/auth/gds/callback?code=4de3a1871f3a078772191e3be0e57182a37dff5ae2199c60d9a8f2d588f457cc&state=2a1d2a0a626b4832323faf825e5a8aa3d842be57b226972c" for 127.0.0.1 at 2012-07-27 15:10:45 +0000
|
7648
|
+
Processing by AuthenticationsController#callback as HTML
|
7649
|
+
Parameters: {"code"=>"4de3a1871f3a078772191e3be0e57182a37dff5ae2199c60d9a8f2d588f457cc", "state"=>"2a1d2a0a626b4832323faf825e5a8aa3d842be57b226972c"}
|
7650
|
+
Authenticating with gds_sso strategy
|
7651
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7652
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7653
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "permissions" = '---
|
7654
|
+
GDS_SSO integration test:
|
7655
|
+
- signin
|
7656
|
+
' WHERE "users"."id" = 1
|
7657
|
+
[1m[36m (6.9ms)[0m [1mcommit transaction[0m
|
7658
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7659
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7660
|
+
GDS_SSO integration test:
|
7661
|
+
- signin
|
7662
|
+
' WHERE "users"."id" = 1[0m
|
7663
|
+
[1m[35m (1.7ms)[0m commit transaction
|
7664
|
+
Redirected to http://www.example-client.com/this_requires_signin_permission
|
7665
|
+
Completed 302 Found in 18ms (ActiveRecord: 9.7ms)
|
7666
|
+
|
7667
|
+
|
7668
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7669
|
+
Processing by ExampleController#this_requires_signin_permission as HTML
|
7670
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7671
|
+
Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)
|
7672
|
+
|
7673
|
+
|
7674
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7675
|
+
Processing by ExampleController#this_requires_signin_permission as HTML
|
7676
|
+
Authenticating with gds_sso strategy
|
7677
|
+
Completed in 0ms
|
7678
|
+
|
7679
|
+
|
7680
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7681
|
+
|
7682
|
+
|
7683
|
+
Started GET "/auth/gds/callback?code=76c08ab7f4943fddd83141cb6bd2c134986d4fddc6fe6967740b25411d2d30ec&state=3dc8466d19ddfc1bee8eddc0c1292942f4600b98ad2fe320" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7684
|
+
Processing by AuthenticationsController#callback as HTML
|
7685
|
+
Parameters: {"code"=>"76c08ab7f4943fddd83141cb6bd2c134986d4fddc6fe6967740b25411d2d30ec", "state"=>"3dc8466d19ddfc1bee8eddc0c1292942f4600b98ad2fe320"}
|
7686
|
+
Authenticating with gds_sso strategy
|
7687
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7688
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7689
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "permissions" = '---
|
7690
|
+
GDS_SSO integration test:
|
7691
|
+
- signin
|
7692
|
+
' WHERE "users"."id" = 1
|
7693
|
+
[1m[36m (9.9ms)[0m [1mcommit transaction[0m
|
7694
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7695
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7696
|
+
GDS_SSO integration test:
|
7697
|
+
- signin
|
7698
|
+
' WHERE "users"."id" = 1[0m
|
7699
|
+
[1m[35m (1.6ms)[0m commit transaction
|
7700
|
+
Redirected to http://www.example-client.com/this_requires_signin_permission
|
7701
|
+
Completed 302 Found in 19ms (ActiveRecord: 12.5ms)
|
7702
|
+
|
7703
|
+
|
7704
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7705
|
+
Processing by ExampleController#this_requires_signin_permission as HTML
|
7706
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7707
|
+
Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.2ms)
|
7708
|
+
|
7709
|
+
|
7710
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7711
|
+
Processing by ExampleController#restricted as HTML
|
7712
|
+
Authenticating with gds_sso strategy
|
7713
|
+
Completed in 0ms
|
7714
|
+
|
7715
|
+
|
7716
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7717
|
+
|
7718
|
+
|
7719
|
+
Started GET "/auth/gds/callback?code=9a6283af999199f4f11137b562f4f22c1cc3931dd1181c9095a137da921b65dd&state=12874f29b1a77b7a2c3c65b608d87a155255090a3e8f268c" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7720
|
+
Processing by AuthenticationsController#callback as HTML
|
7721
|
+
Parameters: {"code"=>"9a6283af999199f4f11137b562f4f22c1cc3931dd1181c9095a137da921b65dd", "state"=>"12874f29b1a77b7a2c3c65b608d87a155255090a3e8f268c"}
|
7722
|
+
Authenticating with gds_sso strategy
|
7723
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7724
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7725
|
+
[1m[35m (0.4ms)[0m UPDATE "users" SET "permissions" = '---
|
7726
|
+
GDS_SSO integration test:
|
7727
|
+
- signin
|
7728
|
+
' WHERE "users"."id" = 1
|
7729
|
+
[1m[36m (10.2ms)[0m [1mcommit transaction[0m
|
7730
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7731
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7732
|
+
GDS_SSO integration test:
|
7733
|
+
- signin
|
7734
|
+
' WHERE "users"."id" = 1[0m
|
7735
|
+
[1m[35m (1.5ms)[0m commit transaction
|
7736
|
+
Redirected to http://www.example-client.com/restricted
|
7737
|
+
Completed 302 Found in 18ms (ActiveRecord: 12.7ms)
|
7738
|
+
|
7739
|
+
|
7740
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7741
|
+
Processing by ExampleController#restricted as HTML
|
7742
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7743
|
+
Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)
|
7744
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7745
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
7746
|
+
[1m[35m (0.2ms)[0m UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
|
7747
|
+
GDS_SSO integration test:
|
7748
|
+
- signin
|
7749
|
+
' WHERE "users"."id" = 1
|
7750
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
7751
|
+
|
7752
|
+
|
7753
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7754
|
+
Processing by ExampleController#restricted as HTML
|
7755
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7756
|
+
Filter chain halted as :authenticate_user! rendered or redirected
|
7757
|
+
Completed 403 Forbidden in 49ms (Views: 47.6ms | ActiveRecord: 0.1ms)
|
7758
|
+
|
7759
|
+
|
7760
|
+
Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2012-07-27 15:10:46 +0000
|
7761
|
+
Processing by AuthenticationsController#sign_out as HTML
|
7762
|
+
Redirected to http://localhost:4567/users/sign_out
|
7763
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
|
7764
|
+
|
7765
|
+
|
7766
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7767
|
+
Processing by ExampleController#restricted as HTML
|
7768
|
+
Authenticating with gds_sso strategy
|
7769
|
+
Completed in 0ms
|
7770
|
+
|
7771
|
+
|
7772
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7773
|
+
|
7774
|
+
|
7775
|
+
Started GET "/auth/gds/callback?code=851d5631bf3917c9bedfdfac5d3e7babf4e5c358030757d6022996e3d4dc139c&state=385cabbc959401723d836b3f36b1ccb7c3c28a3bae995104" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7776
|
+
Processing by AuthenticationsController#callback as HTML
|
7777
|
+
Parameters: {"code"=>"851d5631bf3917c9bedfdfac5d3e7babf4e5c358030757d6022996e3d4dc139c", "state"=>"385cabbc959401723d836b3f36b1ccb7c3c28a3bae995104"}
|
7778
|
+
Authenticating with gds_sso strategy
|
7779
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7780
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7781
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7782
|
+
GDS_SSO integration test:
|
7783
|
+
- signin
|
7784
|
+
' WHERE "users"."id" = 1[0m
|
7785
|
+
[1m[35m (7.8ms)[0m commit transaction
|
7786
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7787
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
|
7788
|
+
GDS_SSO integration test:
|
7789
|
+
- signin
|
7790
|
+
' WHERE "users"."id" = 1
|
7791
|
+
[1m[36m (1.5ms)[0m [1mcommit transaction[0m
|
7792
|
+
Redirected to http://www.example-client.com/restricted
|
7793
|
+
Completed 302 Found in 16ms (ActiveRecord: 10.4ms)
|
7794
|
+
|
7795
|
+
|
7796
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7797
|
+
Processing by ExampleController#restricted as HTML
|
7798
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7799
|
+
Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
7800
|
+
|
7801
|
+
|
7802
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7803
|
+
Processing by ExampleController#restricted as HTML
|
7804
|
+
Authenticating with gds_sso strategy
|
7805
|
+
Completed in 0ms
|
7806
|
+
|
7807
|
+
|
7808
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7809
|
+
|
7810
|
+
|
7811
|
+
Started GET "/auth/gds/callback?code=aefa94681e2a8ac3127a25e2f8adac256b9bf155fd8bd6386b81ac5dcf50fdb0&state=7cd9e702263b66e55b6837370f945c8d1acf782fc896ffc6" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7812
|
+
Processing by AuthenticationsController#callback as HTML
|
7813
|
+
Parameters: {"code"=>"aefa94681e2a8ac3127a25e2f8adac256b9bf155fd8bd6386b81ac5dcf50fdb0", "state"=>"7cd9e702263b66e55b6837370f945c8d1acf782fc896ffc6"}
|
7814
|
+
Authenticating with gds_sso strategy
|
7815
|
+
[1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7816
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7817
|
+
[1m[36m (0.4ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7818
|
+
GDS_SSO integration test:
|
7819
|
+
- signin
|
7820
|
+
' WHERE "users"."id" = 1[0m
|
7821
|
+
[1m[35m (95.0ms)[0m commit transaction
|
7822
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7823
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "permissions" = '---
|
7824
|
+
GDS_SSO integration test:
|
7825
|
+
- signin
|
7826
|
+
' WHERE "users"."id" = 1
|
7827
|
+
[1m[36m (1.5ms)[0m [1mcommit transaction[0m
|
7828
|
+
Redirected to http://www.example-client.com/restricted
|
7829
|
+
Completed 302 Found in 105ms (ActiveRecord: 97.7ms)
|
7830
|
+
|
7831
|
+
|
7832
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7833
|
+
Processing by ExampleController#restricted as HTML
|
7834
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7835
|
+
Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)
|
7836
|
+
|
7837
|
+
|
7838
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-28 11:15:47 +0000
|
7839
|
+
Processing by ExampleController#restricted as HTML
|
7840
|
+
Authenticating with gds_sso strategy
|
7841
|
+
Completed in 0ms
|
7842
|
+
|
7843
|
+
|
7844
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-28 11:15:47 +0000
|
7845
|
+
|
7846
|
+
|
7847
|
+
Started GET "/auth/gds/callback?code=714af03ad561318a94e9165ddd2aaf1c73ddf04a7fcf7f4051af638346894041&state=2f1b0c94ac9b9a82b74bae766e68b19548ac3615183ad06a" for 127.0.0.1 at 2012-07-28 11:15:47 +0000
|
7848
|
+
Processing by AuthenticationsController#callback as HTML
|
7849
|
+
Parameters: {"code"=>"714af03ad561318a94e9165ddd2aaf1c73ddf04a7fcf7f4051af638346894041", "state"=>"2f1b0c94ac9b9a82b74bae766e68b19548ac3615183ad06a"}
|
7850
|
+
Authenticating with gds_sso strategy
|
7851
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7852
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7853
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7854
|
+
GDS_SSO integration test:
|
7855
|
+
- signin
|
7856
|
+
' WHERE "users"."id" = 1[0m
|
7857
|
+
[1m[35m (9.2ms)[0m commit transaction
|
7858
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7859
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "permissions" = '---
|
7860
|
+
GDS_SSO integration test:
|
7861
|
+
- signin
|
7862
|
+
' WHERE "users"."id" = 1
|
7863
|
+
[1m[36m (1.9ms)[0m [1mcommit transaction[0m
|
7864
|
+
Redirected to http://www.example-client.com/restricted
|
7865
|
+
Completed 302 Found in 18ms (ActiveRecord: 12.1ms)
|
7866
|
+
|
7867
|
+
|
7868
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-28 11:15:47 +0000
|
7869
|
+
Processing by ExampleController#restricted as HTML
|
7870
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7871
|
+
Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
7872
|
+
|
7873
|
+
|
7874
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7875
|
+
Processing by ExampleController#restricted as HTML
|
7876
|
+
Authenticating with gds_sso strategy
|
7877
|
+
Completed in 0ms
|
7878
|
+
|
7879
|
+
|
7880
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2012-07-27 15:10:47 +0000
|
7881
|
+
|
7882
|
+
|
7883
|
+
Started GET "/auth/gds/callback?code=83f863ca19e212582240114f5d08935a8bd03b970183821f6c5923044304afc6&state=afaa30f46b9522b2f0b8dfe668f89ca7692bf54f732df9a8" for 127.0.0.1 at 2012-07-27 15:10:48 +0000
|
7884
|
+
Processing by AuthenticationsController#callback as HTML
|
7885
|
+
Parameters: {"code"=>"83f863ca19e212582240114f5d08935a8bd03b970183821f6c5923044304afc6", "state"=>"afaa30f46b9522b2f0b8dfe668f89ca7692bf54f732df9a8"}
|
7886
|
+
Authenticating with gds_sso strategy
|
7887
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7888
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7889
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
7890
|
+
GDS_SSO integration test:
|
7891
|
+
- signin
|
7892
|
+
' WHERE "users"."id" = 1[0m
|
7893
|
+
[1m[35m (9.8ms)[0m commit transaction
|
7894
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
7895
|
+
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
7896
|
+
GDS_SSO integration test:
|
7897
|
+
- signin
|
7898
|
+
' WHERE "users"."id" = 1
|
7899
|
+
[1m[36m (1.6ms)[0m [1mcommit transaction[0m
|
7900
|
+
Redirected to http://www.example-client.com/restricted
|
7901
|
+
Completed 302 Found in 19ms (ActiveRecord: 12.2ms)
|
7902
|
+
|
7903
|
+
|
7904
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:48 +0000
|
7905
|
+
Processing by ExampleController#restricted as HTML
|
7906
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
7907
|
+
Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
|
7908
|
+
|
7909
|
+
|
7910
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-28 11:05:48 +0000
|
7911
|
+
Processing by ExampleController#restricted as HTML
|
7912
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
7913
|
+
Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
7914
|
+
|
7915
|
+
|
7916
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:48 +0000
|
7917
|
+
Processing by ExampleController#restricted as JSON
|
7918
|
+
Authenticating with gds_sso_api_access strategy
|
7919
|
+
Completed in 169ms
|
7920
|
+
|
7921
|
+
|
7922
|
+
Started GET "/restricted" for 127.0.0.1 at 2012-07-27 15:10:48 +0000
|
7923
|
+
Processing by ExampleController#restricted as JSON
|
7924
|
+
Authenticating with gds_sso_api_access strategy
|
7925
|
+
Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
|
7926
|
+
|
7927
|
+
|
7928
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2012-07-27 15:10:48 +0000
|
7929
|
+
Processing by ExampleController#this_requires_signin_permission as JSON
|
7930
|
+
Authenticating with gds_sso_api_access strategy
|
7931
|
+
Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
7932
|
+
[1m[35m (0.2ms)[0m begin transaction
|
7933
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "--- \nGDS_SSO integration test: \n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36815"]]
|
7934
|
+
[1m[35m (11.5ms)[0m commit transaction
|
7935
|
+
WARNING: Can't mass-assign protected attributes: uid, name, permissions
|
7936
|
+
Processing by Api::UserController#update as HTML
|
7937
|
+
Parameters: {"uid"=>"a1s2d36815"}
|
7938
|
+
Completed 403 Forbidden in 4ms (Views: 2.5ms | ActiveRecord: 0.0ms)
|
7939
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7940
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "--- \nGDS_SSO integration test: \n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38581"]]
|
7941
|
+
[1m[36m (1.7ms)[0m [1mcommit transaction[0m
|
7942
|
+
Processing by Api::UserController#update as HTML
|
7943
|
+
Parameters: {"uid"=>"a1s2d38581"}
|
7944
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d38581' LIMIT 1
|
7945
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7946
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
|
7947
|
+
GDS_SSO integration test:
|
7948
|
+
- signin
|
7949
|
+
- new permission
|
7950
|
+
' WHERE "users"."id" = 3
|
7951
|
+
[1m[36m (1.6ms)[0m [1mcommit transaction[0m
|
7952
|
+
Completed 200 OK in 7ms (ActiveRecord: 2.2ms)
|
7953
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]
|
7954
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7955
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "--- \nGDS_SSO integration test: \n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34625"]]
|
7956
|
+
[1m[36m (1.6ms)[0m [1mcommit transaction[0m
|
7957
|
+
WARNING: Can't mass-assign protected attributes: uid, name, permissions
|
7958
|
+
Processing by Api::UserController#reauth as HTML
|
7959
|
+
Parameters: {"uid"=>"a1s2d34625"}
|
7960
|
+
Completed 403 Forbidden in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
|
7961
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7962
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "--- \nGDS_SSO integration test: \n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36260"]]
|
7963
|
+
[1m[35m (1.9ms)[0m commit transaction
|
7964
|
+
Processing by Api::UserController#reauth as HTML
|
7965
|
+
Parameters: {"uid"=>"a1s2d36260"}
|
7966
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d36260' LIMIT 1[0m
|
7967
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7968
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
|
7969
|
+
GDS_SSO integration test:
|
7970
|
+
- signin
|
7971
|
+
' WHERE "users"."id" = 5[0m
|
7972
|
+
[1m[35m (1.6ms)[0m commit transaction
|
7973
|
+
Completed 200 OK in 6ms (ActiveRecord: 2.2ms)
|
7974
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 5]]
|
@@ -24,6 +24,13 @@ class SessionSerialisationTest < Test::Unit::TestCase
|
|
24
24
|
assert_equal [1234, Time.now.utc], result
|
25
25
|
end
|
26
26
|
|
27
|
+
def test_serializing_a_user_without_a_uid_returns_nil
|
28
|
+
@user.stubs(:uid).returns(nil)
|
29
|
+
result = @serializer.serialize(@user)
|
30
|
+
|
31
|
+
assert_equal nil, result
|
32
|
+
end
|
33
|
+
|
27
34
|
def test_deserializing_a_user_and_in_date_timestamp_returns_the_user
|
28
35
|
User.expects(:find_by_uid).with(1234).returns(:a_user)
|
29
36
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gds-sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.2.
|
5
|
+
version: 1.2.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Matt Patterson
|
@@ -231,7 +231,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
231
|
requirements:
|
232
232
|
- - ">="
|
233
233
|
- !ruby/object:Gem::Version
|
234
|
-
hash: -
|
234
|
+
hash: -1714107405945012182
|
235
235
|
segments:
|
236
236
|
- 0
|
237
237
|
version: "0"
|
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
240
|
requirements:
|
241
241
|
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
hash: -
|
243
|
+
hash: -1714107405945012182
|
244
244
|
segments:
|
245
245
|
- 0
|
246
246
|
version: "0"
|