openid_mongodb_store 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/openid_mongodb_store/store.rb +9 -11
- data/openid_mongodb_store.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.2
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
# require File.dirname(__FILE__) + '/nonce'
|
|
2
|
-
# require File.dirname(__FILE__) + '/association'
|
|
3
|
-
|
|
4
1
|
# Again, from the OpenID gem
|
|
5
2
|
require 'openid/store/interface'
|
|
6
3
|
|
|
7
|
-
|
|
8
4
|
class OpenidMongodbStore::Store < OpenID::Store::Interface
|
|
9
5
|
include OpenidMongodbStore
|
|
10
6
|
|
|
@@ -22,12 +18,14 @@ class OpenidMongodbStore::Store < OpenID::Store::Interface
|
|
|
22
18
|
|
|
23
19
|
def store_association(server_url, association)
|
|
24
20
|
remove_association(server_url, association.handle)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
|
|
22
|
+
secret = Mongo::Binary.new(association.secret)
|
|
23
|
+
associations.insert('server_url' => server_url,
|
|
24
|
+
'handle' => association.handle,
|
|
25
|
+
'secret' => secret,
|
|
26
|
+
'issued' => association.issued,
|
|
27
|
+
'lifetime' => association.lifetime,
|
|
28
|
+
'assoc_type' => association.assoc_type)
|
|
31
29
|
end
|
|
32
30
|
|
|
33
31
|
def get_association(server_url, handle=nil)
|
|
@@ -42,7 +40,7 @@ class OpenidMongodbStore::Store < OpenID::Store::Interface
|
|
|
42
40
|
# TODO: Removed .reverse here, make sure that was reasonable.
|
|
43
41
|
assoc_records.each do |a|
|
|
44
42
|
openid_association = OpenID::Association.new(a['handle'],
|
|
45
|
-
a['secret'],
|
|
43
|
+
a['secret'].to_s,
|
|
46
44
|
a['issued'],
|
|
47
45
|
a['lifetime'],
|
|
48
46
|
a['assoc_type'])
|