bsm-sso-client 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,4 @@
1
1
  class Bsm::Sso::Client::Strategies::APIToken < Bsm::Sso::Client::Strategies::HttpAuth
2
- extend ActiveSupport::Memoizable
3
2
 
4
3
  def self.verifier
5
4
  @verifier ||= ActiveSupport::MessageVerifier.new(secret)
@@ -11,7 +10,7 @@ class Bsm::Sso::Client::Strategies::APIToken < Bsm::Sso::Client::Strategies::Htt
11
10
  end
12
11
 
13
12
  def self.secret
14
- Bsm::Sso::Client.secret
13
+ @secret ||= Bsm::Sso::Client.secret
15
14
  end
16
15
 
17
16
  def self.user_instance
@@ -35,12 +34,15 @@ class Bsm::Sso::Client::Strategies::APIToken < Bsm::Sso::Client::Strategies::Htt
35
34
  end
36
35
 
37
36
  def expiration
38
- result = self.class.verifier.verify(token)
39
- result if result.acts_like?(:time)
40
- rescue ActiveSupport::MessageVerifier::InvalidSignature
41
- nil
37
+ return @expiration if defined?(@expiration)
38
+
39
+ @expiration = begin
40
+ result = self.class.verifier.verify(token)
41
+ result if result.acts_like?(:time)
42
+ rescue ActiveSupport::MessageVerifier::InvalidSignature
43
+ nil
44
+ end
42
45
  end
43
- memoize :expiration
44
46
 
45
47
  Warden::Strategies.add :sso_api_token, self
46
48
  end
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.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-15 00:00:00.000000000Z
12
+ date: 2012-01-04 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activeresource
16
- requirement: &18232380 !ruby/object:Gem::Requirement
16
+ requirement: &21533600 !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: *18232380
27
+ version_requirements: *21533600
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: actionpack
30
- requirement: &18230600 !ruby/object:Gem::Requirement
30
+ requirement: &21531920 !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: *18230600
41
+ version_requirements: *21531920
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: railties
44
- requirement: &18229320 !ruby/object:Gem::Requirement
44
+ requirement: &21529320 !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: *18229320
55
+ version_requirements: *21529320
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rails_warden
58
- requirement: &18228180 !ruby/object:Gem::Requirement
58
+ requirement: &21500600 !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: *18228180
66
+ version_requirements: *21500600
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: activerecord
69
- requirement: &18227620 !ruby/object:Gem::Requirement
69
+ requirement: &21498180 !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: *18227620
77
+ version_requirements: *21498180
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: rake
80
- requirement: &18223100 !ruby/object:Gem::Requirement
80
+ requirement: &21495920 !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: *18223100
88
+ version_requirements: *21495920
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rack-test
91
- requirement: &18222520 !ruby/object:Gem::Requirement
91
+ requirement: &21494300 !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: *18222520
99
+ version_requirements: *21494300
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: rspec
102
- requirement: &18221920 !ruby/object:Gem::Requirement
102
+ requirement: &21492720 !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: *18221920
110
+ version_requirements: *21492720
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: shoulda-matchers
113
- requirement: &18221380 !ruby/object:Gem::Requirement
113
+ requirement: &21491180 !ruby/object:Gem::Requirement
114
114
  none: false
115
115
  requirements:
116
116
  - - ! '>='
@@ -118,10 +118,10 @@ dependencies:
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
- version_requirements: *18221380
121
+ version_requirements: *21491180
122
122
  - !ruby/object:Gem::Dependency
123
123
  name: webmock
124
- requirement: &18220740 !ruby/object:Gem::Requirement
124
+ requirement: &21464140 !ruby/object:Gem::Requirement
125
125
  none: false
126
126
  requirements:
127
127
  - - ! '>='
@@ -129,10 +129,10 @@ dependencies:
129
129
  version: '0'
130
130
  type: :development
131
131
  prerelease: false
132
- version_requirements: *18220740
132
+ version_requirements: *21464140
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: sqlite3-ruby
135
- requirement: &18220100 !ruby/object:Gem::Requirement
135
+ requirement: &21462500 !ruby/object:Gem::Requirement
136
136
  none: false
137
137
  requirements:
138
138
  - - ! '>='
@@ -140,7 +140,7 @@ dependencies:
140
140
  version: '0'
141
141
  type: :development
142
142
  prerelease: false
143
- version_requirements: *18220100
143
+ version_requirements: *21462500
144
144
  description: ''
145
145
  email: dimitrij@blacksquaremedia.com
146
146
  executables: []