jwt 0.1.7 → 0.1.8
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/Rakefile +1 -1
- data/jwt.gemspec +2 -2
- data/lib/jwt.rb +1 -1
- data/spec/jwt_spec.rb +8 -0
- metadata +2 -2
data/Rakefile
CHANGED
data/jwt.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "jwt"
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jeff Lindsay"]
|
9
|
-
s.date = "2013-03-
|
9
|
+
s.date = "2013-03-14"
|
10
10
|
s.description = "JSON Web Token implementation in Ruby"
|
11
11
|
s.email = "progrium@gmail.com"
|
12
12
|
s.extra_rdoc_files = ["lib/jwt.rb"]
|
data/lib/jwt.rb
CHANGED
data/spec/jwt_spec.rb
CHANGED
@@ -66,6 +66,14 @@ describe JWT do
|
|
66
66
|
decoded_payload.should == @payload
|
67
67
|
end
|
68
68
|
|
69
|
+
it "checks the key when verify is truthy" do
|
70
|
+
right_secret = 'foo'
|
71
|
+
bad_secret = 'bar'
|
72
|
+
jwt = JWT.encode(@payload, right_secret)
|
73
|
+
verify = "yes" =~ /^y/i
|
74
|
+
lambda { JWT.decode(jwt, bad_secret, verify) }.should raise_error(JWT::DecodeError)
|
75
|
+
end
|
76
|
+
|
69
77
|
it "raises exception on unsupported crypto algorithm" do
|
70
78
|
lambda { JWT.encode(@payload, "secret", 'HS1024') }.should raise_error(NotImplementedError)
|
71
79
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jwt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|