http_signatures 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/README.md +3 -0
- data/lib/http_signatures/signature.rb +2 -2
- data/lib/http_signatures/signature_parameters.rb +1 -1
- data/lib/http_signatures/signer.rb +1 -1
- data/lib/http_signatures/version.rb +1 -1
- data/spec/signature_parameters_spec.rb +4 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d136cb544dc8b6205a43355d1e53bf2b54048516
|
4
|
+
data.tar.gz: 4d38e02586fb55893520c2c3f053326e74314082
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 380b2d510876617ed8d3a59aaeb3d8c76e7b9f6539713ebb942d220f853c3fbb47377a439d02a369ec7e14b51d5d56942a724393e376120d0e5457d7280e26be
|
7
|
+
data.tar.gz: 0f182c9d26ebf56596c84f9b6d9c7fdc1a848a6f6ddb8af4ebc974cee52d973106ba983fa61322ff304927dba7af5e878ad117e271c3e2c1009db61296ce96fa
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -10,6 +10,8 @@ See also:
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
+
Add [`http_signatures`][gem] to your `Gemfile`.
|
14
|
+
|
13
15
|
Configure a context with your algorithm, keys, headers to sign. In Rails,
|
14
16
|
this is best placed in an initializer.
|
15
17
|
|
@@ -73,3 +75,4 @@ Pull Requests are welcome.
|
|
73
75
|
|
74
76
|
|
75
77
|
[draft03]: http://tools.ietf.org/html/draft-cavage-http-signatures-03
|
78
|
+
[gem]: http://rubygems.org/gems/http_signatures
|
@@ -9,7 +9,7 @@ module HttpSignatures
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def to_str
|
12
|
-
@algorithm.sign(@key.secret, signing_string)
|
12
|
+
@algorithm.sign(@key.secret, signing_string.to_str)
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
@@ -18,7 +18,7 @@ module HttpSignatures
|
|
18
18
|
SigningString.new(
|
19
19
|
header_list: @header_list,
|
20
20
|
message: @message,
|
21
|
-
)
|
21
|
+
)
|
22
22
|
end
|
23
23
|
|
24
24
|
end
|
@@ -9,10 +9,10 @@ RSpec.describe HttpSignatures::SignatureParameters do
|
|
9
9
|
)
|
10
10
|
end
|
11
11
|
|
12
|
-
let(:key) {
|
13
|
-
let(:algorithm) {
|
14
|
-
let(:header_list) {
|
15
|
-
let(:signature) { "sigstring" }
|
12
|
+
let(:key) { instance_double("HttpSignatures::Key", id: "pda") }
|
13
|
+
let(:algorithm) { instance_double("HttpSignatures::Algorithm::Hmac", name: "hmac-test") }
|
14
|
+
let(:header_list) { instance_double("HttpSignatures::HeaderList", to_str: "a b c") }
|
15
|
+
let(:signature) { instance_double("HttpSignatures::Signature", to_str: "sigstring") }
|
16
16
|
|
17
17
|
describe "#to_str" do
|
18
18
|
it "builds parameters into string" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_signatures
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Annesley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -61,6 +61,7 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
63
|
- ".rspec"
|
64
|
+
- ".travis.yml"
|
64
65
|
- Gemfile
|
65
66
|
- LICENSE.txt
|
66
67
|
- README.md
|