hawk-auth 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/lib/hawk/authorization_header.rb +1 -1
- data/lib/hawk/crypto.rb +1 -1
- data/lib/hawk/server.rb +2 -1
- data/lib/hawk/version.rb +1 -1
- data/spec/crypto_spec.rb +3 -3
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e886d0166e10ebe92293831005796c5cb9e883de
|
4
|
+
data.tar.gz: 038b0386846cd31413ea6adeaa36a83774e0a53c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cbc837a40e6c81fd44a4fb18addf8fbd6f18dbb2f600aa3a4a58c75ce9d71bac2c70d5d14e7f1e398661b1e82d043bfa08b70b526cfefe13036536d73025e7c
|
7
|
+
data.tar.gz: 86e0d02139a5ba45b5260c11b5d7d71f5f3ab7753f6085ff94b0af67f3c9070a17c4dddee775117caf2a81fbd8d22bbd4f5bb0caae140a79e2dd8b83b3d4ca08
|
data/.travis.yml
CHANGED
@@ -95,7 +95,7 @@ module Hawk
|
|
95
95
|
:nonce => parts[:nonce],
|
96
96
|
:ext => parts[:ext],
|
97
97
|
:app => options[:app] || parts[:app],
|
98
|
-
:
|
98
|
+
:dlg => options[:dlg] || parts[:dlg]
|
99
99
|
)
|
100
100
|
|
101
101
|
expected_hash = parts[:hash] ? Crypto.hash(options.merge(:credentials => credentials)) : nil
|
data/lib/hawk/crypto.rb
CHANGED
data/lib/hawk/server.rb
CHANGED
@@ -41,7 +41,8 @@ module Hawk
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def build_authorization_header(options)
|
44
|
-
|
44
|
+
options[:type] = 'response'
|
45
|
+
Hawk::AuthorizationHeader.build(options, [:hash, :ext, :mac])
|
45
46
|
end
|
46
47
|
|
47
48
|
def build_tsm_header(options)
|
data/lib/hawk/version.rb
CHANGED
data/spec/crypto_spec.rb
CHANGED
@@ -188,7 +188,7 @@ describe Hawk::Crypto::Mac do
|
|
188
188
|
it_behaves_like "an input normalization method"
|
189
189
|
end
|
190
190
|
|
191
|
-
context "with app and
|
191
|
+
context "with app and dlg" do
|
192
192
|
let(:input) do
|
193
193
|
{
|
194
194
|
:ts => 1365701514,
|
@@ -198,12 +198,12 @@ describe Hawk::Crypto::Mac do
|
|
198
198
|
:host => 'example.com',
|
199
199
|
:port => 8080,
|
200
200
|
:app => 'some app id',
|
201
|
-
:
|
201
|
+
:dlg => 'some dlg'
|
202
202
|
}
|
203
203
|
end
|
204
204
|
|
205
205
|
let(:expected_output) do
|
206
|
-
%(hawk.1.header\n#{input[:ts]}\n#{input[:nonce]}\n#{input[:method]}\n#{input[:request_uri]}\n#{input[:host]}\n#{input[:port]}\n\n\n#{input[:app]}\n#{input[:
|
206
|
+
%(hawk.1.header\n#{input[:ts]}\n#{input[:nonce]}\n#{input[:method]}\n#{input[:request_uri]}\n#{input[:host]}\n#{input[:port]}\n\n\n#{input[:app]}\n#{input[:dlg]}\n)
|
207
207
|
end
|
208
208
|
|
209
209
|
it_behaves_like "an input normalization method"
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hawk-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Stuart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '2.11'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.11'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mocha
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.13'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.13'
|
69
69
|
description: Ruby implementation of Hawk
|
@@ -73,8 +73,8 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .travis.yml
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
78
78
|
- Gemfile
|
79
79
|
- LICENSE
|
80
80
|
- README.md
|
@@ -103,17 +103,17 @@ require_paths:
|
|
103
103
|
- lib
|
104
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- -
|
106
|
+
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- -
|
111
|
+
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.2.2
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Ruby implementation of Hawk
|