wepay-signer 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wepay-signer.rb +5 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dee087f2859195456da1b0ed41de40beefa30ab7
4
- data.tar.gz: ec8a0ebdb7918e3d14af18d9591199070c09f154
3
+ metadata.gz: f7fb015fc3d4cfc62eb41ce3f68a0f4ace00ee16
4
+ data.tar.gz: 22678ac26cade5b4353f816aa567523061eecdc8
5
5
  SHA512:
6
- metadata.gz: 9089628d9b8642359f8c3a1d071a91298e4c9df22fe1b2b38c8b9288022fba00301b35e7920bf522c046bd021fc032c962da4a6ec4d31544aa9fc208cca7be0e
7
- data.tar.gz: 877c49f80dc7360751985e814c634ad656822bf1cef7953444529a6ac87bb1ccebe7c951ceba0746f93fe7558330b1cf718a42617af9d379b7a2dcf2c412b8b9
6
+ metadata.gz: 5b52be0c5370302dbe9a9c0268d38e8f64a6d24940f6e2341624a8432dfd7fd40f3100f4fc743b9467ea30830844515202ecacb6c956bc41170b9948f256194b
7
+ data.tar.gz: 17fa08190200b1f718a497e0a8a01e2f768c2d5b60fac7e9fdd0bd2f6728bc0bdc4b36453869a33c3101eb4828d8e4d009f64dda19336e815258beada289f4ce
@@ -1,5 +1,5 @@
1
1
  ##
2
- # Copyright (c) 2015 WePay.
2
+ # Copyright (c) 2015-2016 WePay.
3
3
  #
4
4
  # Based on a stripped-down version of the AWS Signature v4 implementation.
5
5
  #
@@ -84,6 +84,8 @@ module WePay
84
84
  ##
85
85
  # Signs and generates the query string URL parameters to use when making a request.
86
86
  #
87
+ # If the `client_secret` key is provided, then it will be automatically excluded from the result.
88
+ #
87
89
  # @param payload [Hash] The data to generate a signature for.
88
90
  # @option payload [required, String] token The one-time-use token.
89
91
  # @option payload [required, String] page The WePay URL to access.
@@ -91,6 +93,8 @@ module WePay
91
93
  # @return [String] The query string parameters to append to the end of a URL.
92
94
  ##
93
95
  def generate_query_string_params(payload)
96
+ payload.delete(:client_secret) if payload.has_key? :client_secret
97
+
94
98
  signed_token = sign(payload)
95
99
  payload[:client_id] = @client_id
96
100
  payload[:stoken] = signed_token
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wepay-signer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - WePay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-23 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Modern Ruby SDK for signing WePay requests.
14
14
  email: api@wepay.com
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  version: '0'
38
38
  requirements: []
39
39
  rubyforge_project:
40
- rubygems_version: 2.4.5
40
+ rubygems_version: 2.5.1
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: WePay Signer for Ruby