blockstack 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6f17928fc071da951073e2908a2153fe04cd76a
4
- data.tar.gz: 803d5b93db854420100a55f600ce031e92d965bd
3
+ metadata.gz: 8daf40736cb953c765242753a4cb4eb2316e2e0c
4
+ data.tar.gz: bd4f321c8caf70f2c3553a309730f7fb265a8ca0
5
5
  SHA512:
6
- metadata.gz: 303b4e3cb314f087247ae5c48b032b89483c7751df68729eb3a7060c118478b8e1f6ebb7bc46b34c1b934962c9e2088f97f01f2867394124c8a793597365ce95
7
- data.tar.gz: db1f710195a86d49aed2ac54638e29fb5c3c75d3db69cb1b24eb68bbb62bbe6522984b47d4b5cf9ee2e228e62bdeb4de0957a6e8afd4a9bd316ef395bc0b1597
6
+ metadata.gz: f6cc5b4436ef16f75a3cc85dfc631ba30f1caaff7e772d3dd59b61bf66ab41fc43f84b99c5ad2a36058dff3612d5ff706c095a788107389f78a8d959f5f9ad26
7
+ data.tar.gz: 6d9a69b8302ecce9131b9aa40ff95b876ecc6f5c7312b3f42e13dee629ae562701ae9b3f021a54fa67a8d5eadc42686513bf01dc78f240197dc1929b205843a6
data/blockstack.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "webmock"
26
26
  spec.add_development_dependency "vcr"
27
27
 
28
- spec.add_dependency "jwt-blockstack", "2.0.0.beta2"
28
+ spec.add_dependency "jwtb", "2.0.0.beta2.bsk1"
29
29
  spec.add_dependency "bitcoin-ruby"
30
30
  spec.add_dependency "faraday"
31
31
 
data/lib/blockstack.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require "blockstack/version"
2
2
  require "bitcoin"
3
3
  require "faraday"
4
- require "jwt-blockstack"
4
+ require "jwtb"
5
5
 
6
6
  module Blockstack
7
7
  class InvalidAuthResponse < StandardError; end
@@ -43,7 +43,7 @@ module Blockstack
43
43
  # public keys
44
44
  public_key = nil
45
45
  verify = false
46
- decoded_tokens = JWT.decode auth_token, public_key, verify, algorithm: ALGORITHM
46
+ decoded_tokens = JWTB.decode auth_token, public_key, verify, algorithm: ALGORITHM
47
47
  decoded_token = decoded_tokens[0]
48
48
 
49
49
  REQUIRED_CLAIMS.each do |field|
@@ -65,7 +65,7 @@ module Blockstack
65
65
  verify = true
66
66
 
67
67
  # decode & verify signature
68
- decoded_tokens = JWT.decode auth_token, ecdsa_key, verify, algorithm: ALGORITHM, exp_leeway: self.leeway
68
+ decoded_tokens = JWTB.decode auth_token, ecdsa_key, verify, algorithm: ALGORITHM, exp_leeway: self.leeway
69
69
  decoded_token = decoded_tokens[0]
70
70
 
71
71
  raise InvalidAuthResponse.new("Public keys don't match issuer address") unless self.public_keys_match_issuer?(decoded_token)
@@ -73,9 +73,9 @@ module Blockstack
73
73
  raise InvalidAuthResponse.new("Public keys don't match owner of claimed username") unless self.public_keys_match_username?(decoded_token)
74
74
 
75
75
  return decoded_token
76
- rescue JWT::VerificationError => error
76
+ rescue JWTB::VerificationError => error
77
77
  raise InvalidAuthResponse.new("Signature on JWT is invalid")
78
- rescue JWT::DecodeError => error
78
+ rescue JWTB::DecodeError => error
79
79
  raise InvalidAuthResponse.new("Unable to decode JWT")
80
80
  rescue RuntimeError => error
81
81
  raise InvalidAuthResponse.new(error.message)
@@ -1,3 +1,3 @@
1
1
  module Blockstack
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Larry Salibra
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-20 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,19 +81,19 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: jwt-blockstack
84
+ name: jwtb
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 2.0.0.beta2
89
+ version: 2.0.0.beta2.bsk1
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 2.0.0.beta2
96
+ version: 2.0.0.beta2.bsk1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bitcoin-ruby
99
99
  requirement: !ruby/object:Gem::Requirement