gds-sso 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
data/config/routes.rb CHANGED
@@ -2,5 +2,4 @@ Rails.application.routes.draw do
2
2
  match '/auth/gds/callback', to: 'authentications#callback', as: :gds_sign_in
3
3
  match '/auth/gds/sign_out', to: 'authentications#sign_out', as: :gds_sign_out
4
4
  match '/auth/failure', to: 'authentications#failure', as: :auth_failure
5
- match '/authorisations/cant_signin', to: 'authorisations#cant_signin', as: :cant_signin
6
5
  end
data/lib/gds-sso/user.rb CHANGED
@@ -13,6 +13,10 @@ module GDS
13
13
  end
14
14
 
15
15
  module User
16
+ def included(base)
17
+ attr_accessible :uid, :email, :name, :permissions, as: :oauth
18
+ end
19
+
16
20
  def has_permission?(scope, permission)
17
21
  if permissions && permissions.has_key?(scope)
18
22
  permissions[scope].include?(permission) || permissions[scope].include?("admin")
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "0.7.5"
3
+ VERSION = "0.7.6"
4
4
  end
5
5
  end
@@ -2649,3 +2649,339 @@ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 15:48:25 +0000
2649
2649
  Processing by ExampleController#restricted as JSON
2650
2650
  Authenticating with gds_sso_api_access strategy
2651
2651
  Completed 200 OK in 1ms (Views: 0.5ms)
2652
+
2653
+
2654
+ Started GET "/" for 127.0.0.1 at 2012-06-27 16:28:55 +0000
2655
+ Processing by ExampleController#index as HTML
2656
+ Rendered text template (0.0ms)
2657
+ Completed 200 OK in 46ms (Views: 45.2ms)
2658
+
2659
+
2660
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 16:28:55 +0000
2661
+ Processing by ExampleController#restricted as HTML
2662
+ Authenticating with gds_sso strategy
2663
+ Completed in 56ms
2664
+
2665
+
2666
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-27 16:28:55 +0000
2667
+
2668
+
2669
+ Started GET "/auth/gds/callback?code=081618f5b5f04271c64daa24910814098a6b9e538a52aed8f664ef57c19633a2" for 127.0.0.1 at 2012-06-27 16:28:56 +0000
2670
+ Processing by AuthenticationsController#callback as HTML
2671
+ Parameters: {"code"=>"081618f5b5f04271c64daa24910814098a6b9e538a52aed8f664ef57c19633a2"}
2672
+ Authenticating with gds_sso strategy
2673
+ Redirected to http://www.example-client.com/restricted
2674
+ Completed 302 Found in 1ms
2675
+
2676
+
2677
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 16:28:56 +0000
2678
+ Processing by ExampleController#restricted as HTML
2679
+ Completed 200 OK in 1ms (Views: 0.5ms)
2680
+
2681
+
2682
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 16:28:56 +0000
2683
+ Processing by ExampleController#restricted as HTML
2684
+ Authenticating with gds_sso strategy
2685
+ Completed in 0ms
2686
+
2687
+
2688
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-27 16:28:56 +0000
2689
+
2690
+
2691
+ Started GET "/auth/gds/callback?code=6382bcee8f16aee5661a610b68e3668c554fb455d8df287ca6bfdf0dc1775c36" for 127.0.0.1 at 2012-06-27 16:28:56 +0000
2692
+ Processing by AuthenticationsController#callback as HTML
2693
+ Parameters: {"code"=>"6382bcee8f16aee5661a610b68e3668c554fb455d8df287ca6bfdf0dc1775c36"}
2694
+ Authenticating with gds_sso strategy
2695
+ Redirected to http://www.example-client.com/restricted
2696
+ Completed 302 Found in 1ms
2697
+
2698
+
2699
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 16:28:57 +0000
2700
+ Processing by ExampleController#restricted as HTML
2701
+ Completed 200 OK in 1ms (Views: 0.6ms)
2702
+
2703
+
2704
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 16:28:57 +0000
2705
+ Processing by ExampleController#restricted as HTML
2706
+ Authenticating with gds_sso strategy
2707
+ Completed in 0ms
2708
+
2709
+
2710
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-27 16:28:57 +0000
2711
+
2712
+
2713
+ Started GET "/auth/gds/callback?code=df29de51d402ffe84c622b505e9197f82828adfa28dc6e7c757a3a16a8ffa364" for 127.0.0.1 at 2012-06-27 16:28:57 +0000
2714
+ Processing by AuthenticationsController#callback as HTML
2715
+ Parameters: {"code"=>"df29de51d402ffe84c622b505e9197f82828adfa28dc6e7c757a3a16a8ffa364"}
2716
+ Authenticating with gds_sso strategy
2717
+ Redirected to http://www.example-client.com/restricted
2718
+ Completed 302 Found in 1ms
2719
+
2720
+
2721
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 16:28:57 +0000
2722
+ Processing by ExampleController#restricted as HTML
2723
+ Completed 200 OK in 1ms (Views: 0.3ms)
2724
+
2725
+
2726
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 16:28:57 +0000
2727
+ Processing by ExampleController#restricted as JSON
2728
+ Authenticating with gds_sso_api_access strategy
2729
+ Completed in 59ms
2730
+
2731
+
2732
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-27 16:28:57 +0000
2733
+ Processing by ExampleController#restricted as JSON
2734
+ Authenticating with gds_sso_api_access strategy
2735
+ Completed 200 OK in 1ms (Views: 0.5ms)
2736
+
2737
+
2738
+ Started GET "/" for 127.0.0.1 at 2012-06-28 08:34:06 +0000
2739
+ Processing by ExampleController#index as HTML
2740
+ Rendered text template (0.0ms)
2741
+ Completed 200 OK in 199ms (Views: 198.7ms)
2742
+
2743
+
2744
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 08:34:07 +0000
2745
+ Processing by ExampleController#restricted as HTML
2746
+ Authenticating with gds_sso strategy
2747
+ Completed in 207ms
2748
+
2749
+
2750
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 08:34:07 +0000
2751
+
2752
+
2753
+ Started GET "/auth/gds/callback?code=90ba8057cc502fadc33fee4fbbcfa4c7124feab2aeee6c4e7193cb1bdf805f42" for 127.0.0.1 at 2012-06-28 08:34:10 +0000
2754
+ Processing by AuthenticationsController#callback as HTML
2755
+ Parameters: {"code"=>"90ba8057cc502fadc33fee4fbbcfa4c7124feab2aeee6c4e7193cb1bdf805f42"}
2756
+ Authenticating with gds_sso strategy
2757
+ Redirected to http://www.example-client.com/restricted
2758
+ Completed 302 Found in 1ms
2759
+
2760
+
2761
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 08:34:11 +0000
2762
+ Processing by ExampleController#restricted as HTML
2763
+ Completed 200 OK in 1ms (Views: 0.5ms)
2764
+
2765
+
2766
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 08:34:11 +0000
2767
+ Processing by ExampleController#restricted as HTML
2768
+ Authenticating with gds_sso strategy
2769
+ Completed in 0ms
2770
+
2771
+
2772
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 08:34:11 +0000
2773
+
2774
+
2775
+ Started GET "/auth/gds/callback?code=54dbb3cc72cdb99d00cae71dca153fc2454105fec072f459d558369765a02659" for 127.0.0.1 at 2012-06-28 08:34:11 +0000
2776
+ Processing by AuthenticationsController#callback as HTML
2777
+ Parameters: {"code"=>"54dbb3cc72cdb99d00cae71dca153fc2454105fec072f459d558369765a02659"}
2778
+ Authenticating with gds_sso strategy
2779
+ Redirected to http://www.example-client.com/restricted
2780
+ Completed 302 Found in 1ms
2781
+
2782
+
2783
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 08:34:12 +0000
2784
+ Processing by ExampleController#restricted as HTML
2785
+ Completed 200 OK in 1ms (Views: 0.6ms)
2786
+
2787
+
2788
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 08:34:12 +0000
2789
+ Processing by ExampleController#restricted as HTML
2790
+ Authenticating with gds_sso strategy
2791
+ Completed in 0ms
2792
+
2793
+
2794
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 08:34:12 +0000
2795
+
2796
+
2797
+ Started GET "/auth/gds/callback?code=cf38c078b388ccdf07dac852917dfcd09496cac3433beaa8643a21b6b55ec70f" for 127.0.0.1 at 2012-06-28 08:34:12 +0000
2798
+ Processing by AuthenticationsController#callback as HTML
2799
+ Parameters: {"code"=>"cf38c078b388ccdf07dac852917dfcd09496cac3433beaa8643a21b6b55ec70f"}
2800
+ Authenticating with gds_sso strategy
2801
+ Redirected to http://www.example-client.com/restricted
2802
+ Completed 302 Found in 1ms
2803
+
2804
+
2805
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 08:34:12 +0000
2806
+ Processing by ExampleController#restricted as HTML
2807
+ Completed 200 OK in 1ms (Views: 0.3ms)
2808
+
2809
+
2810
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 08:34:12 +0000
2811
+ Processing by ExampleController#restricted as JSON
2812
+ Authenticating with gds_sso_api_access strategy
2813
+ Completed in 250ms
2814
+
2815
+
2816
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 08:34:13 +0000
2817
+ Processing by ExampleController#restricted as JSON
2818
+ Authenticating with gds_sso_api_access strategy
2819
+ Completed 200 OK in 1ms (Views: 0.6ms)
2820
+
2821
+
2822
+ Started GET "/" for 127.0.0.1 at 2012-06-28 12:14:25 +0000
2823
+ Processing by ExampleController#index as HTML
2824
+ Rendered text template (0.0ms)
2825
+ Completed 200 OK in 48ms (Views: 47.2ms)
2826
+
2827
+
2828
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 12:14:25 +0000
2829
+ Processing by ExampleController#restricted as HTML
2830
+ Authenticating with gds_sso strategy
2831
+ Completed in 58ms
2832
+
2833
+
2834
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 12:14:25 +0000
2835
+
2836
+
2837
+ Started GET "/auth/gds/callback?code=b8a7d142f3f95e2e01a9427704f0c1d783bff8c7d573f1931f279336ae26532a" for 127.0.0.1 at 2012-06-28 12:14:26 +0000
2838
+ Processing by AuthenticationsController#callback as HTML
2839
+ Parameters: {"code"=>"b8a7d142f3f95e2e01a9427704f0c1d783bff8c7d573f1931f279336ae26532a"}
2840
+ Authenticating with gds_sso strategy
2841
+ Redirected to http://www.example-client.com/restricted
2842
+ Completed 302 Found in 1ms
2843
+
2844
+
2845
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2846
+ Processing by ExampleController#restricted as HTML
2847
+ Completed 200 OK in 1ms (Views: 0.5ms)
2848
+
2849
+
2850
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2851
+ Processing by ExampleController#restricted as HTML
2852
+ Authenticating with gds_sso strategy
2853
+ Completed in 0ms
2854
+
2855
+
2856
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2857
+
2858
+
2859
+ Started GET "/auth/gds/callback?code=c898131de5086f9d62d755e9ecb2f316d768df7d3667c50a8d6ea8533dfdced3" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2860
+ Processing by AuthenticationsController#callback as HTML
2861
+ Parameters: {"code"=>"c898131de5086f9d62d755e9ecb2f316d768df7d3667c50a8d6ea8533dfdced3"}
2862
+ Authenticating with gds_sso strategy
2863
+ Redirected to http://www.example-client.com/restricted
2864
+ Completed 302 Found in 1ms
2865
+
2866
+
2867
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2868
+ Processing by ExampleController#restricted as HTML
2869
+ Completed 200 OK in 1ms (Views: 0.6ms)
2870
+
2871
+
2872
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2873
+ Processing by ExampleController#restricted as HTML
2874
+ Authenticating with gds_sso strategy
2875
+ Completed in 0ms
2876
+
2877
+
2878
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2879
+
2880
+
2881
+ Started GET "/auth/gds/callback?code=2c6ea9bd33588680881feab3a67e16bbc64ef7172f9a762918042d3c70427d71" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2882
+ Processing by AuthenticationsController#callback as HTML
2883
+ Parameters: {"code"=>"2c6ea9bd33588680881feab3a67e16bbc64ef7172f9a762918042d3c70427d71"}
2884
+ Authenticating with gds_sso strategy
2885
+ Redirected to http://www.example-client.com/restricted
2886
+ Completed 302 Found in 1ms
2887
+
2888
+
2889
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2890
+ Processing by ExampleController#restricted as HTML
2891
+ Completed 200 OK in 1ms (Views: 0.4ms)
2892
+
2893
+
2894
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2895
+ Processing by ExampleController#restricted as JSON
2896
+ Authenticating with gds_sso_api_access strategy
2897
+ Completed in 88ms
2898
+
2899
+
2900
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 12:14:27 +0000
2901
+ Processing by ExampleController#restricted as JSON
2902
+ Authenticating with gds_sso_api_access strategy
2903
+ Completed 200 OK in 1ms (Views: 0.5ms)
2904
+
2905
+
2906
+ Started GET "/" for 127.0.0.1 at 2012-06-28 13:17:24 +0000
2907
+ Processing by ExampleController#index as HTML
2908
+ Rendered text template (0.0ms)
2909
+ Completed 200 OK in 62ms (Views: 61.4ms)
2910
+
2911
+
2912
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 13:17:25 +0000
2913
+ Processing by ExampleController#restricted as HTML
2914
+ Authenticating with gds_sso strategy
2915
+ Completed in 57ms
2916
+
2917
+
2918
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 13:17:25 +0000
2919
+
2920
+
2921
+ Started GET "/auth/gds/callback?code=2367f1a7c0c39c65021534aec9fdf5b1d1183112847a7a86e83af782bc95c446" for 127.0.0.1 at 2012-06-28 13:17:26 +0000
2922
+ Processing by AuthenticationsController#callback as HTML
2923
+ Parameters: {"code"=>"2367f1a7c0c39c65021534aec9fdf5b1d1183112847a7a86e83af782bc95c446"}
2924
+ Authenticating with gds_sso strategy
2925
+ Redirected to http://www.example-client.com/restricted
2926
+ Completed 302 Found in 1ms
2927
+
2928
+
2929
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 13:17:26 +0000
2930
+ Processing by ExampleController#restricted as HTML
2931
+ Completed 200 OK in 1ms (Views: 0.5ms)
2932
+
2933
+
2934
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 13:17:26 +0000
2935
+ Processing by ExampleController#restricted as HTML
2936
+ Authenticating with gds_sso strategy
2937
+ Completed in 0ms
2938
+
2939
+
2940
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 13:17:26 +0000
2941
+
2942
+
2943
+ Started GET "/auth/gds/callback?code=553c52e1d90ee6f6fc2fee5125c61772aa6ebf49582084f533fc323eb171e242" for 127.0.0.1 at 2012-06-28 13:17:27 +0000
2944
+ Processing by AuthenticationsController#callback as HTML
2945
+ Parameters: {"code"=>"553c52e1d90ee6f6fc2fee5125c61772aa6ebf49582084f533fc323eb171e242"}
2946
+ Authenticating with gds_sso strategy
2947
+ Redirected to http://www.example-client.com/restricted
2948
+ Completed 302 Found in 1ms
2949
+
2950
+
2951
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 13:17:27 +0000
2952
+ Processing by ExampleController#restricted as HTML
2953
+ Completed 200 OK in 1ms (Views: 0.6ms)
2954
+
2955
+
2956
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 13:17:27 +0000
2957
+ Processing by ExampleController#restricted as HTML
2958
+ Authenticating with gds_sso strategy
2959
+ Completed in 0ms
2960
+
2961
+
2962
+ Started GET "/auth/gds" for 127.0.0.1 at 2012-06-28 13:17:27 +0000
2963
+
2964
+
2965
+ Started GET "/auth/gds/callback?code=f40af220e1f2baaea7120131fd2532d09534222461040fae554e982b95ff3118" for 127.0.0.1 at 2012-06-28 13:17:27 +0000
2966
+ Processing by AuthenticationsController#callback as HTML
2967
+ Parameters: {"code"=>"f40af220e1f2baaea7120131fd2532d09534222461040fae554e982b95ff3118"}
2968
+ Authenticating with gds_sso strategy
2969
+ Redirected to http://www.example-client.com/restricted
2970
+ Completed 302 Found in 1ms
2971
+
2972
+
2973
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 13:17:27 +0000
2974
+ Processing by ExampleController#restricted as HTML
2975
+ Completed 200 OK in 1ms (Views: 0.4ms)
2976
+
2977
+
2978
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 13:17:27 +0000
2979
+ Processing by ExampleController#restricted as JSON
2980
+ Authenticating with gds_sso_api_access strategy
2981
+ Completed in 136ms
2982
+
2983
+
2984
+ Started GET "/restricted" for 127.0.0.1 at 2012-06-28 13:17:27 +0000
2985
+ Processing by ExampleController#restricted as JSON
2986
+ Authenticating with gds_sso_api_access strategy
2987
+ Completed 200 OK in 1ms (Views: 0.6ms)
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.5
5
+ version: 0.7.6
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-27 00:00:00 Z
14
+ date: 2012-06-28 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -204,7 +204,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
204
204
  requirements:
205
205
  - - ">="
206
206
  - !ruby/object:Gem::Version
207
- hash: 449159821961409847
207
+ hash: 3204247925115360978
208
208
  segments:
209
209
  - 0
210
210
  version: "0"
@@ -213,14 +213,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  requirements:
214
214
  - - ">="
215
215
  - !ruby/object:Gem::Version
216
- hash: 449159821961409847
216
+ hash: 3204247925115360978
217
217
  segments:
218
218
  - 0
219
219
  version: "0"
220
220
  requirements: []
221
221
 
222
222
  rubyforge_project: gds-sso
223
- rubygems_version: 1.8.12
223
+ rubygems_version: 1.8.24
224
224
  signing_key:
225
225
  specification_version: 3
226
226
  summary: Client for GDS' OAuth 2-based SSO