ruby-openid 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ruby-openid might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/openid/consumer.rb +2 -9
- data/lib/openid/consumer/discovery.rb +2 -2
- data/lib/openid/store/memcache.rb +1 -1
- data/lib/openid/version.rb +1 -1
- data/test/test_consumer.rb +4 -14
- metadata +2 -3
- data/lib/openid/serializer.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d186800e0c39656fbed4cbd52caa3e3f0bb9fc5
|
4
|
+
data.tar.gz: 8a971700503c5c287aa46f5c4c1804300f52a921
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aee76e05216b0b0954496c11d70b5df2c4a3cfe7c9f55aad74f1f1563f18891a6f7526859b695ace038556bb77ce33e152671547592a78591a8b4b1ff50d9fb2
|
7
|
+
data.tar.gz: 4eefe5dcdcbe9fcce8f3846c06e3e1841bd7b703bee34c2d46193eb6d32d17ef87bfe47fda605fa73090401317e5c7390de21f7206c09a288373c4ebf8f5948f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.5.0
|
4
|
+
|
5
|
+
* Revert json serialization - 8dc60e553369df2300ebb4b83a29618aff643c2c
|
6
|
+
See https://github.com/openid/ruby-openid/pull/73
|
7
|
+
|
3
8
|
## 2.4.0
|
4
9
|
|
5
10
|
* Allow expecting a parameter to be nil during return_to verification - 708e992ab3e6c26d478283fc11faa6a0a74bfec0
|
data/lib/openid/consumer.rb
CHANGED
@@ -7,7 +7,6 @@ require "openid/consumer/discovery"
|
|
7
7
|
require "openid/message"
|
8
8
|
require "openid/yadis/discovery"
|
9
9
|
require "openid/store/nonce"
|
10
|
-
require "openid/serializer"
|
11
10
|
|
12
11
|
module OpenID
|
13
12
|
# OpenID support for Relying Parties (aka Consumers).
|
@@ -298,17 +297,11 @@ module OpenID
|
|
298
297
|
protected
|
299
298
|
|
300
299
|
def session_get(name)
|
301
|
-
|
302
|
-
|
303
|
-
if value.is_a?(Array) # new serialized format
|
304
|
-
Serializer.deserialize(*value)
|
305
|
-
else # deprecated object format
|
306
|
-
value
|
307
|
-
end
|
300
|
+
@session[session_key(name)]
|
308
301
|
end
|
309
302
|
|
310
303
|
def session_set(name, val)
|
311
|
-
@session[session_key(name)] =
|
304
|
+
@session[session_key(name)] = val
|
312
305
|
end
|
313
306
|
|
314
307
|
def session_key(suffix)
|
@@ -58,7 +58,7 @@ module OpenID
|
|
58
58
|
def display_identifier
|
59
59
|
return @display_identifier if @display_identifier
|
60
60
|
|
61
|
-
return @claimed_id if @claimed_id.nil?
|
61
|
+
return @claimed_id if @claimed_id.nil?
|
62
62
|
|
63
63
|
begin
|
64
64
|
parsed_identifier = URI.parse(@claimed_id)
|
@@ -376,7 +376,7 @@ module OpenID
|
|
376
376
|
#
|
377
377
|
# @param uri: normalized identity URL
|
378
378
|
# @type uri: str
|
379
|
-
#
|
379
|
+
#
|
380
380
|
# @return: (claimed_id, services)
|
381
381
|
# @rtype: (str, list(OpenIDServiceEndpoint))
|
382
382
|
#
|
data/lib/openid/version.rb
CHANGED
data/test/test_consumer.rb
CHANGED
@@ -6,24 +6,14 @@ module OpenID
|
|
6
6
|
class Consumer
|
7
7
|
module TestConsumer
|
8
8
|
class TestLastEndpoint < Test::Unit::TestCase
|
9
|
-
def all_instance_variables(object)
|
10
|
-
object.instance_variables.map { |v| [v.to_s, object.instance_variable_get(v)] }
|
11
|
-
end
|
12
|
-
|
13
9
|
def test_set_get
|
14
|
-
stored = OpenID::OpenIDServiceEndpoint.new
|
15
|
-
stored.server_url = "test"
|
16
10
|
session = {}
|
17
|
-
|
18
11
|
consumer = Consumer.new(session, nil)
|
19
|
-
consumer.send(:last_requested_endpoint=,
|
20
|
-
|
12
|
+
consumer.send(:last_requested_endpoint=, :endpoint)
|
21
13
|
ep = consumer.send(:last_requested_endpoint)
|
22
|
-
assert_equal(
|
23
|
-
|
14
|
+
assert_equal(:endpoint, ep)
|
24
15
|
ep = consumer.send(:last_requested_endpoint)
|
25
|
-
assert_equal(
|
26
|
-
|
16
|
+
assert_equal(:endpoint, ep)
|
27
17
|
consumer.send(:cleanup_last_requested_endpoint)
|
28
18
|
ep = consumer.send(:last_requested_endpoint)
|
29
19
|
assert_equal(nil, ep)
|
@@ -120,7 +110,7 @@ module OpenID
|
|
120
110
|
result = consumer.begin_without_discovery(@service, @anonymous)
|
121
111
|
assert(result.instance_of?(CheckIDRequest))
|
122
112
|
assert_equal(@anonymous, result.anonymous)
|
123
|
-
assert_equal(@service
|
113
|
+
assert_equal(@service, consumer.send(:last_requested_endpoint))
|
124
114
|
assert_equal(result.instance_variable_get(:@assoc), @assoc)
|
125
115
|
return result
|
126
116
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-openid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JanRain, Inc
|
8
8
|
autorequire: openid
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: openid@janrain.com
|
@@ -115,7 +115,6 @@ files:
|
|
115
115
|
- lib/openid/kvpost.rb
|
116
116
|
- lib/openid/message.rb
|
117
117
|
- lib/openid/protocolerror.rb
|
118
|
-
- lib/openid/serializer.rb
|
119
118
|
- lib/openid/server.rb
|
120
119
|
- lib/openid/store/filesystem.rb
|
121
120
|
- lib/openid/store/interface.rb
|
data/lib/openid/serializer.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module OpenID
|
2
|
-
class Serializer
|
3
|
-
SERIALIZABLE = {
|
4
|
-
"OpenID::OpenIDServiceEndpoint" => [OpenID::OpenIDServiceEndpoint, 0],
|
5
|
-
"OpenID::Consumer::DiscoveredServices" => [OpenID::Consumer::DiscoveredServices, 3]
|
6
|
-
}
|
7
|
-
|
8
|
-
def self.serialize(instance)
|
9
|
-
klass = instance.class.name
|
10
|
-
raise "unable to serialize #{klass}" unless SERIALIZABLE[klass]
|
11
|
-
[klass, instance.instance_variables.map { |v| [v.to_s, instance.instance_variable_get(v)] }]
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.deserialize(klass, data)
|
15
|
-
klass, arguments = SERIALIZABLE[klass] || raise("unable to deserialize #{klass}")
|
16
|
-
instance = klass.new(*Array.new(arguments))
|
17
|
-
data.each { |k,v| instance.instance_variable_set(k,v) }
|
18
|
-
instance
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|