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 CHANGED
@@ -1 +1 @@
1
- 0.1.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
- associations.insert(:server_url => server_url,
26
- :handle => association.handle,
27
- :secret => association.secret,
28
- :issued => association.issued,
29
- :lifetime => association.lifetime,
30
- :assoc_type => association.assoc_type)
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'])
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{openid_mongodb_store}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sam Schenkman-Moore"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openid_mongodb_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Schenkman-Moore