bsm-sso-client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,7 @@ require 'rails_warden'
8
8
  module Bsm
9
9
  module Sso
10
10
  module Client
11
+ autoload :AbstractResource, 'bsm/sso/client/abstract_resource'
11
12
  autoload :User, 'bsm/sso/client/user'
12
13
  autoload :UserMethods, 'bsm/sso/client/user_methods'
13
14
  autoload :UrlHelpers, 'bsm/sso/client/url_helpers'
@@ -24,7 +25,7 @@ module Bsm
24
25
 
25
26
  class << self
26
27
 
27
- delegate :site=, :site, :to => :"Bsm::Sso::Client::User"
28
+ delegate :site=, :site, :to => :"Bsm::Sso::Client::AbstractResource"
28
29
 
29
30
  def user_class
30
31
  @@user_class || Bsm::Sso::Client::User
@@ -0,0 +1,12 @@
1
+ class Bsm::Sso::Client::AbstractResource < ActiveResource::Base
2
+ self.format = :json
3
+
4
+ class << self
5
+
6
+ def headers
7
+ { 'AUTHORIZATION' => Bsm::Sso::Client.verifier.generate(30.seconds.from_now) }
8
+ end
9
+
10
+ end
11
+ end
12
+
@@ -1,12 +1,6 @@
1
- class Bsm::Sso::Client::User < ActiveResource::Base
2
- self.format = :json
3
-
1
+ class Bsm::Sso::Client::User < Bsm::Sso::Client::AbstractResource
4
2
  class << self
5
3
 
6
- def headers
7
- { 'AUTHORIZATION' => Bsm::Sso::Client.verifier.generate(30.seconds.from_now) }
8
- end
9
-
10
4
  def consume(ticket, service)
11
5
  # TODO rename Sso endpoint to /validate
12
6
  find :one, :from => '/validate', :params => { :ticket => ticket, :service => service }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bsm-sso-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-21 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activeresource
16
- requirement: &25666220 !ruby/object:Gem::Requirement
16
+ requirement: &13682080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 3.2.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *25666220
27
+ version_requirements: *13682080
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: actionpack
30
- requirement: &25665200 !ruby/object:Gem::Requirement
30
+ requirement: &13680960 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -38,10 +38,10 @@ dependencies:
38
38
  version: 3.2.0
39
39
  type: :runtime
40
40
  prerelease: false
41
- version_requirements: *25665200
41
+ version_requirements: *13680960
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: railties
44
- requirement: &25663920 !ruby/object:Gem::Requirement
44
+ requirement: &13680200 !ruby/object:Gem::Requirement
45
45
  none: false
46
46
  requirements:
47
47
  - - ! '>='
@@ -52,10 +52,10 @@ dependencies:
52
52
  version: 3.2.0
53
53
  type: :runtime
54
54
  prerelease: false
55
- version_requirements: *25663920
55
+ version_requirements: *13680200
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rails_warden
58
- requirement: &25662760 !ruby/object:Gem::Requirement
58
+ requirement: &13679360 !ruby/object:Gem::Requirement
59
59
  none: false
60
60
  requirements:
61
61
  - - ~>
@@ -63,10 +63,10 @@ dependencies:
63
63
  version: 0.5.0
64
64
  type: :runtime
65
65
  prerelease: false
66
- version_requirements: *25662760
66
+ version_requirements: *13679360
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: rake
69
- requirement: &25648320 !ruby/object:Gem::Requirement
69
+ requirement: &13669420 !ruby/object:Gem::Requirement
70
70
  none: false
71
71
  requirements:
72
72
  - - ! '>='
@@ -74,10 +74,10 @@ dependencies:
74
74
  version: '0'
75
75
  type: :development
76
76
  prerelease: false
77
- version_requirements: *25648320
77
+ version_requirements: *13669420
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: rack-test
80
- requirement: &25646620 !ruby/object:Gem::Requirement
80
+ requirement: &13668960 !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
83
83
  - - ! '>='
@@ -85,10 +85,10 @@ dependencies:
85
85
  version: '0'
86
86
  type: :development
87
87
  prerelease: false
88
- version_requirements: *25646620
88
+ version_requirements: *13668960
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rspec
91
- requirement: &25646200 !ruby/object:Gem::Requirement
91
+ requirement: &13668520 !ruby/object:Gem::Requirement
92
92
  none: false
93
93
  requirements:
94
94
  - - ! '>='
@@ -96,10 +96,10 @@ dependencies:
96
96
  version: '0'
97
97
  type: :development
98
98
  prerelease: false
99
- version_requirements: *25646200
99
+ version_requirements: *13668520
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: shoulda-matchers
102
- requirement: &25645560 !ruby/object:Gem::Requirement
102
+ requirement: &13668060 !ruby/object:Gem::Requirement
103
103
  none: false
104
104
  requirements:
105
105
  - - ! '>='
@@ -107,10 +107,10 @@ dependencies:
107
107
  version: '0'
108
108
  type: :development
109
109
  prerelease: false
110
- version_requirements: *25645560
110
+ version_requirements: *13668060
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: webmock
113
- requirement: &25644920 !ruby/object:Gem::Requirement
113
+ requirement: &13667460 !ruby/object:Gem::Requirement
114
114
  none: false
115
115
  requirements:
116
116
  - - ! '>='
@@ -118,7 +118,7 @@ dependencies:
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
- version_requirements: *25644920
121
+ version_requirements: *13667460
122
122
  description: ''
123
123
  email: dimitrij@blacksquaremedia.com
124
124
  executables: []
@@ -130,6 +130,7 @@ files:
130
130
  - lib/bsm/sso/client/strategies/base.rb
131
131
  - lib/bsm/sso/client/strategies/http_auth.rb
132
132
  - lib/bsm/sso/client/failure_app.rb
133
+ - lib/bsm/sso/client/abstract_resource.rb
133
134
  - lib/bsm/sso/client/railtie.rb
134
135
  - lib/bsm/sso/client/user_methods.rb
135
136
  - lib/bsm/sso/client/url_helpers.rb