trust_me 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.markdown +82 -0
- data/Rakefile +12 -0
- data/lib/trust_me/version.rb +3 -0
- data/lib/trust_me.rb +220 -0
- data/spec/fixtures/verify-call-success.json +19 -0
- data/spec/fixtures/verify-sms-success.json +15 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/trust_me_spec.rb +141 -0
- data/vendor/cacert.pem +22 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b27c6d276f92c43d1c327c45d95b3508639ef0fa
|
4
|
+
data.tar.gz: be8f2eb7a3910b92adeb1fbb3fab9403776357b6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 08eb5e47d9fd3b79c0b644a018250fa46d6bd6e4070ce14b680e75a0b2217b714f09fe013104adab143b44e94e15813e5fcac38937e7883241731a66764aef8e
|
7
|
+
data.tar.gz: b02fa2bb5f7572097f3ce55a75daa365422b634c6a8fedae4508833a40e25b5962efa1d3a3dca4617669e179bc6eb244a4349d02abc5852665c4f48fe39c8f89
|
data/README.markdown
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
# TrustMe
|
2
|
+
|
3
|
+
This library is a wrapper for the TeleSign REST API. Currently the Verify Call
|
4
|
+
and Verify SMS web services are supported. The Verify Call web service sends a
|
5
|
+
verification code to a user in a voice message with a phone call. The Verify
|
6
|
+
SMS web service sends a verification code to a user in a text message via SMS.
|
7
|
+
The user enters this code in a web application to verify their identity.
|
8
|
+
|
9
|
+
See also:
|
10
|
+
- <http://docs.telesign.com/rest/content/verify-call.html>
|
11
|
+
- <http://docs.telesign.com/rest/content/verify-sms.html>
|
12
|
+
|
13
|
+
## Configuration
|
14
|
+
|
15
|
+
Set global credentials:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
TrustMe.config do |c|
|
19
|
+
c.customer_id = "1234"
|
20
|
+
c.secret_key = "secret"
|
21
|
+
end
|
22
|
+
```
|
23
|
+
|
24
|
+
If you need different credentials per-instance:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
trust_me = TrustMe.new "5678", "secret2"
|
28
|
+
```
|
29
|
+
|
30
|
+
## Usage
|
31
|
+
|
32
|
+
Send a verification call to a customer and save the verification code:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
class VerifyController < ApplicationController
|
36
|
+
def create
|
37
|
+
trust_me = TrustMe.new
|
38
|
+
call = trust_me.send_verification_call! current_user.phone
|
39
|
+
|
40
|
+
current_user.update_attribute! :verification_code, call[:code]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
Or send a verification SMS to a customer:
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
class VerifyController < ApplicationController
|
49
|
+
def create
|
50
|
+
trust_me = TrustMe.new
|
51
|
+
sms = trust_me.send_verification_sms! current_user.phone
|
52
|
+
|
53
|
+
current_user.update_attribute! :verification_code, sms[:code]
|
54
|
+
end
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
The customer verifies the code:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
class VerifyController < ApplicationController
|
62
|
+
def update
|
63
|
+
if params[:code] == current_user.verification_code
|
64
|
+
current_user.set_verified!
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
```
|
69
|
+
|
70
|
+
## Note on Patches/Pull Requests
|
71
|
+
|
72
|
+
* Fork the project.
|
73
|
+
* Make your feature addition or bug fix.
|
74
|
+
* Add tests for it. This is important so we don't break it in a future version
|
75
|
+
unintentionally.
|
76
|
+
* Commit, do not bump version. (If you want to have your own version, that is
|
77
|
+
fine but bump version in a commit by itself we can ignore when we pull).
|
78
|
+
* Send us a pull request. Bonus points for topic branches.
|
79
|
+
|
80
|
+
## Copyright
|
81
|
+
|
82
|
+
Copyright (c) 2014 WWWH, LLC. See LICENSE for details.
|
data/Rakefile
ADDED
data/lib/trust_me.rb
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
require "trust_me/version"
|
2
|
+
require "json"
|
3
|
+
require "uri"
|
4
|
+
require "net/http"
|
5
|
+
require "base64"
|
6
|
+
require "openssl"
|
7
|
+
|
8
|
+
class TrustMe
|
9
|
+
# Public: URL to the TeleSign REST API.
|
10
|
+
#
|
11
|
+
# Returns a URI::HTTPS instance.
|
12
|
+
API_URL = URI.parse("https://rest.telesign.com")
|
13
|
+
|
14
|
+
# Public: Gets/sets configuration info to connect to the TeleSign API.
|
15
|
+
#
|
16
|
+
# Example
|
17
|
+
#
|
18
|
+
# TrustMe.config do |c|
|
19
|
+
# c.customer_id = "1234"
|
20
|
+
# c.secret_key = "secret"
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# Returns a Struct.
|
24
|
+
def self.config
|
25
|
+
@config ||= Struct.new(:customer_id, :secret_key).new
|
26
|
+
yield @config if block_given?
|
27
|
+
@config
|
28
|
+
end
|
29
|
+
|
30
|
+
# Public: Creates a new TrustMe instance.
|
31
|
+
#
|
32
|
+
# customer_id - TeleSign customer ID
|
33
|
+
# secret_key - TeleSign secret key
|
34
|
+
#
|
35
|
+
# Raises RuntimeError if credentials aren't setup.
|
36
|
+
#
|
37
|
+
# Returns nothing.
|
38
|
+
def initialize(customer_id = nil, secret_key = nil)
|
39
|
+
@customer_id = customer_id || self.class.config.customer_id
|
40
|
+
@secret_key = secret_key || self.class.config.secret_key
|
41
|
+
|
42
|
+
unless @customer_id && @secret_key
|
43
|
+
raise "You must supply API credentials. Try `TrustMe.new " \
|
44
|
+
'"customer_id", "secret_key"` or `TrustMe.config`'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Public: Send a verification call to the given phone number.
|
49
|
+
#
|
50
|
+
# number - The phone number to call
|
51
|
+
# options - Hash of options
|
52
|
+
# :verify_code - Code to send the user, if not supplied a 5-digit
|
53
|
+
# code is automatically generated
|
54
|
+
# :language - Language to use on the call, defaults to "en-US"
|
55
|
+
# :ucid - Use case ID, defaults to "TRVF"
|
56
|
+
# (Transaction Verification)
|
57
|
+
#
|
58
|
+
# See: http://docs.telesign.com/rest/content/verify-call.html#index-5
|
59
|
+
#
|
60
|
+
# Returns a Hash.
|
61
|
+
def send_verification_call!(number, options = {})
|
62
|
+
verify_code = options.fetch(:verify_code, generate_code)
|
63
|
+
|
64
|
+
output = api_request(
|
65
|
+
:resource => "/v1/verify/call",
|
66
|
+
:params => encode_hash(
|
67
|
+
:ucid => options.fetch(:ucid, "TRVF"),
|
68
|
+
:phone_number => number,
|
69
|
+
:language => options.fetch(:language, "en-US"),
|
70
|
+
:verify_code => verify_code
|
71
|
+
)
|
72
|
+
)
|
73
|
+
|
74
|
+
{ :data => output, :code => verify_code }
|
75
|
+
end
|
76
|
+
|
77
|
+
# Public: Send a verification SMS to the given phone number.
|
78
|
+
#
|
79
|
+
# number - The phone number to message
|
80
|
+
# options - Hash of options
|
81
|
+
# :verify_code - Code to send the user, if not supplied a 5-digit
|
82
|
+
# code is automatically generated
|
83
|
+
# :language - Language to use on the call, defaults to "en-US"
|
84
|
+
# :ucid - Use case ID, defaults to "TRVF"
|
85
|
+
# (Transaction Verification)
|
86
|
+
# :template - Optional text template, must include "$$CODE$$"
|
87
|
+
#
|
88
|
+
# See: http://docs.telesign.com/rest/content/verify-sms.html#index-5
|
89
|
+
#
|
90
|
+
# Returns a Hash.
|
91
|
+
def send_verification_sms!(number, options = {})
|
92
|
+
verify_code = options.fetch(:verify_code, generate_code)
|
93
|
+
|
94
|
+
output = api_request(
|
95
|
+
:resource => "/v1/verify/sms",
|
96
|
+
:params => encode_hash(
|
97
|
+
:ucid => options.fetch(:ucid, "TRVF"),
|
98
|
+
:phone_number => number,
|
99
|
+
:language => options.fetch(:language, "en-US"),
|
100
|
+
:verify_code => verify_code,
|
101
|
+
:template => options[:template]
|
102
|
+
)
|
103
|
+
)
|
104
|
+
|
105
|
+
{ :data => output, :code => verify_code }
|
106
|
+
end
|
107
|
+
|
108
|
+
# Public: Generates headers used to authenticate with the API.
|
109
|
+
#
|
110
|
+
# options - Hash of options
|
111
|
+
# :resource - API resource (required)
|
112
|
+
# :params - Params to send (required)
|
113
|
+
#
|
114
|
+
# Raises KeyError if any required keys are missing.
|
115
|
+
#
|
116
|
+
# See: http://docs.telesign.com/rest/content/rest-auth.html
|
117
|
+
#
|
118
|
+
# Returns a Hash.
|
119
|
+
def generate_headers(options = {})
|
120
|
+
content_type = "application/x-www-form-urlencoded"
|
121
|
+
date = Time.now.gmtime.strftime("%a, %d %b %Y %H:%M:%S GMT")
|
122
|
+
nonce = `uuidgen`.chomp
|
123
|
+
|
124
|
+
content = [
|
125
|
+
"POST",
|
126
|
+
content_type,
|
127
|
+
"", # Blank spot for "Date" header, which is overridden by x-ts-date
|
128
|
+
"x-ts-auth-method:HMAC-SHA256",
|
129
|
+
"x-ts-date:#{date}",
|
130
|
+
"x-ts-nonce:#{nonce}",
|
131
|
+
options.fetch(:params),
|
132
|
+
options.fetch(:resource)
|
133
|
+
].join("\n")
|
134
|
+
|
135
|
+
hash = OpenSSL::Digest::SHA256.new rand.to_s
|
136
|
+
key = Base64.decode64(@secret_key)
|
137
|
+
digest = OpenSSL::HMAC.digest(hash, key, content)
|
138
|
+
auth = Base64.encode64(digest)
|
139
|
+
|
140
|
+
{
|
141
|
+
"Authorization" => "TSA #{@customer_id}:#{auth}",
|
142
|
+
"Content-Type" => content_type,
|
143
|
+
"x-ts-date" => date,
|
144
|
+
"x-ts-auth-method" => "HMAC-SHA256",
|
145
|
+
"x-ts-nonce" => nonce
|
146
|
+
}
|
147
|
+
end
|
148
|
+
|
149
|
+
private
|
150
|
+
|
151
|
+
# Private: Generates a random 5 digit code.
|
152
|
+
#
|
153
|
+
# Returns a String.
|
154
|
+
def generate_code
|
155
|
+
(0..4).map { (48 + rand(10)).chr }.join
|
156
|
+
end
|
157
|
+
|
158
|
+
# Private: URL-encodes a hash to a string for submission via HTTP.
|
159
|
+
#
|
160
|
+
# hash - A Hash to encode
|
161
|
+
#
|
162
|
+
# Returns a String.
|
163
|
+
def encode_hash(hash)
|
164
|
+
URI.encode_www_form hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Private: CA certificate file to verify SSL connection with `API_URL`
|
168
|
+
#
|
169
|
+
# Returns an OpenSSL::X509::Certificate instance.
|
170
|
+
def cacert
|
171
|
+
@cacert ||= OpenSSL::X509::Certificate.new \
|
172
|
+
File.read(File.expand_path("../../vendor/cacert.pem", __FILE__))
|
173
|
+
end
|
174
|
+
|
175
|
+
# Private: Parse the given JSON string.
|
176
|
+
#
|
177
|
+
# string - Raw JSON string
|
178
|
+
#
|
179
|
+
# Returns a Hash.
|
180
|
+
def parse_json(string)
|
181
|
+
JSON.parse string
|
182
|
+
end
|
183
|
+
|
184
|
+
# Private: Submits an API request via POST.
|
185
|
+
#
|
186
|
+
# options - Hash of options
|
187
|
+
# :resource - API resource (required)
|
188
|
+
# :params - Params to send (required)
|
189
|
+
#
|
190
|
+
# Raises KeyError if any required keys are missing.
|
191
|
+
# Raises a Net::HTTP exception if the request is not successful.
|
192
|
+
#
|
193
|
+
# Returns a Hash.
|
194
|
+
def api_request(options = {})
|
195
|
+
http = Net::HTTP.new(API_URL.host, API_URL.port)
|
196
|
+
http.use_ssl = API_URL.scheme == "https"
|
197
|
+
|
198
|
+
if http.use_ssl?
|
199
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
200
|
+
http.cert_store = OpenSSL::X509::Store.new
|
201
|
+
http.cert_store.add_cert cacert
|
202
|
+
end
|
203
|
+
|
204
|
+
headers = generate_headers(options)
|
205
|
+
body = options.fetch(:params)
|
206
|
+
resource = options.fetch(:resource)
|
207
|
+
response = http.request_post resource, body, headers
|
208
|
+
output = parse_json(response.body)
|
209
|
+
|
210
|
+
if response.is_a? Net::HTTPSuccess
|
211
|
+
output
|
212
|
+
else
|
213
|
+
raise response.error_type.new(
|
214
|
+
"#{response.code} #{response.message.dump}\n" \
|
215
|
+
"Response body: #{output.inspect}",
|
216
|
+
response
|
217
|
+
)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"reference_id" : "ABCDEF0123456789ABCDEF0123456789",
|
3
|
+
"resource_uri" : "/v1/verify/ABCDEF0123456789ABCDEF0123456789",
|
4
|
+
"sub_resource" : "call",
|
5
|
+
"errors": [],
|
6
|
+
"status" : {
|
7
|
+
"updated_on" : "2012-04-17T22:26:43.784963Z",
|
8
|
+
"code" : 103,
|
9
|
+
"description" : "Call in progress"
|
10
|
+
},
|
11
|
+
"call_forwarding": {
|
12
|
+
"mode": "FLAG",
|
13
|
+
"status": "FORWARDED"
|
14
|
+
},
|
15
|
+
"verify" : {
|
16
|
+
"code_state" : "UNKNOWN",
|
17
|
+
"code_entered" : ""
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"reference_id" : "ABCDEF0123456789ABCDEF0123456789",
|
3
|
+
"resource_uri" : "/v1/verify/ABCDEF0123456789ABCDEF0123456789",
|
4
|
+
"sub_resource" : "sms",
|
5
|
+
"errors": [],
|
6
|
+
"status" : {
|
7
|
+
"updated_on" : "2012-04-17T22:26:43.784963Z",
|
8
|
+
"code" : 290,
|
9
|
+
"description" : "Message in progress"
|
10
|
+
},
|
11
|
+
"verify" : {
|
12
|
+
"code_state" : "UNKNOWN",
|
13
|
+
"code_entered" : ""
|
14
|
+
}
|
15
|
+
}
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "rspec"
|
2
|
+
require "webmock/rspec"
|
3
|
+
require "trust_me"
|
4
|
+
|
5
|
+
RSpec.configure do |config|
|
6
|
+
config.color = true
|
7
|
+
config.order = "rand"
|
8
|
+
config.formatter = "progress"
|
9
|
+
end
|
10
|
+
|
11
|
+
TrustMe.config do |c|
|
12
|
+
c.customer_id = "custid"
|
13
|
+
c.secret_key = Base64.encode64("secret")
|
14
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe TrustMe do
|
4
|
+
let :trust_me do
|
5
|
+
TrustMe.new
|
6
|
+
end
|
7
|
+
|
8
|
+
let :now do
|
9
|
+
Time.utc 2014, 11, 13, 12, 20, 00
|
10
|
+
end
|
11
|
+
|
12
|
+
let :now_rfc1123 do
|
13
|
+
"Thu, 13 Nov 2014 12:20:00 GMT"
|
14
|
+
end
|
15
|
+
|
16
|
+
let :uuid do
|
17
|
+
"3846B06C-C3C1-4C36-9426-2317B5C96C78"
|
18
|
+
end
|
19
|
+
|
20
|
+
before do
|
21
|
+
allow(Time).to receive(:now) { now }
|
22
|
+
allow(trust_me).to receive(:`).with("uuidgen") { uuid }
|
23
|
+
end
|
24
|
+
|
25
|
+
shared_examples_for "api_call" do |method, extra_request_params = {}|
|
26
|
+
let :response_body do
|
27
|
+
File.read("spec/fixtures/verify-#{method}-success.json")
|
28
|
+
end
|
29
|
+
|
30
|
+
let :request_headers do
|
31
|
+
{
|
32
|
+
"Authorization" => /TSA custid:.*/,
|
33
|
+
"x-ts-date" => now_rfc1123,
|
34
|
+
"x-ts-auth-method" => "HMAC-SHA256",
|
35
|
+
"x-ts-nonce" => uuid,
|
36
|
+
"Content-Type" => "application/x-www-form-urlencoded",
|
37
|
+
|
38
|
+
# Set automatically by Net::HTTP
|
39
|
+
"Accept" => "*/*",
|
40
|
+
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
41
|
+
"User-Agent" => "Ruby"
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
let :request_body do
|
46
|
+
{
|
47
|
+
"language" => "en-US",
|
48
|
+
"phone_number" => "15554443333",
|
49
|
+
"ucid" => "TRVF",
|
50
|
+
"verify_code" => "12345"
|
51
|
+
}.merge(extra_request_params)
|
52
|
+
end
|
53
|
+
|
54
|
+
before do
|
55
|
+
allow(trust_me).to receive(:generate_code) { "12345" }
|
56
|
+
end
|
57
|
+
|
58
|
+
let! :stub do
|
59
|
+
stub_request(:post, "#{TrustMe::API_URL}/v1/verify/#{method}")
|
60
|
+
.with(:headers => request_headers, :body => request_body)
|
61
|
+
.to_return(:body => response_body)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "#send_verification_call!" do
|
66
|
+
it_behaves_like "api_call", "call" do
|
67
|
+
it "submits the request" do
|
68
|
+
trust_me.send_verification_call! "15554443333"
|
69
|
+
|
70
|
+
expect(stub).to have_been_made
|
71
|
+
end
|
72
|
+
|
73
|
+
it "returns the the data and code" do
|
74
|
+
response = trust_me.send_verification_call! "15554443333"
|
75
|
+
|
76
|
+
expect(response[:code]).to eq("12345")
|
77
|
+
expect(response[:data]).to eq(JSON.parse(response_body))
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "#send_verification_sms!" do
|
83
|
+
it_behaves_like "api_call", "sms", { :template => "CODE: $$CODE$$" } do
|
84
|
+
it "submits the request" do
|
85
|
+
trust_me.send_verification_sms! "15554443333", :template => "CODE: $$CODE$$"
|
86
|
+
|
87
|
+
expect(stub).to have_been_made
|
88
|
+
end
|
89
|
+
|
90
|
+
it "returns the the data and code" do
|
91
|
+
response = trust_me.send_verification_sms! "15554443333", :template => "CODE: $$CODE$$"
|
92
|
+
|
93
|
+
expect(response[:code]).to eq("12345")
|
94
|
+
expect(response[:data]).to eq(JSON.parse(response_body))
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "#generate_headers" do
|
100
|
+
let :hash do
|
101
|
+
OpenSSL::Digest.new("sha256", "abc")
|
102
|
+
end
|
103
|
+
|
104
|
+
let :params do
|
105
|
+
"a=1&b=2"
|
106
|
+
end
|
107
|
+
|
108
|
+
let :resource do
|
109
|
+
"/some/resource"
|
110
|
+
end
|
111
|
+
|
112
|
+
before do
|
113
|
+
allow(OpenSSL::Digest::SHA256).to receive(:digest) { hash }
|
114
|
+
end
|
115
|
+
|
116
|
+
let :auth do
|
117
|
+
content = [
|
118
|
+
"POST",
|
119
|
+
"application/x-www-form-urlencoded",
|
120
|
+
"",
|
121
|
+
"x-ts-auth-method:HMAC-SHA256",
|
122
|
+
"x-ts-date:#{now_rfc1123}",
|
123
|
+
"x-ts-nonce:#{uuid}",
|
124
|
+
params,
|
125
|
+
resource
|
126
|
+
].join("\n")
|
127
|
+
|
128
|
+
Base64.encode64 OpenSSL::HMAC.digest(hash, "secret", content)
|
129
|
+
end
|
130
|
+
|
131
|
+
it "returns proper headers" do
|
132
|
+
headers = trust_me.generate_headers(:params => params, :resource => resource)
|
133
|
+
|
134
|
+
expect(headers["Authorization"]).to eq "TSA custid:#{auth}"
|
135
|
+
expect(headers["Content-Type"]).to eq "application/x-www-form-urlencoded"
|
136
|
+
expect(headers["x-ts-date"]).to eq now_rfc1123
|
137
|
+
expect(headers["x-ts-auth-method"]).to eq "HMAC-SHA256"
|
138
|
+
expect(headers["x-ts-nonce"]).to eq uuid
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
data/vendor/cacert.pem
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# https://www.thawte.com/roots/thawte_Premium_Server_CA.pem
|
2
|
+
|
3
|
+
-----BEGIN CERTIFICATE-----
|
4
|
+
MIIDNjCCAp+gAwIBAgIQNhIilsXjOKUgodJfTNcJVDANBgkqhkiG9w0BAQUFADCB
|
5
|
+
zjELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJ
|
6
|
+
Q2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UE
|
7
|
+
CxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhh
|
8
|
+
d3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNl
|
9
|
+
cnZlckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIxMDEwMTIzNTk1OVow
|
10
|
+
gc4xCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcT
|
11
|
+
CUNhcGUgVG93bjEdMBsGA1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNV
|
12
|
+
BAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRo
|
13
|
+
YXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1z
|
14
|
+
ZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2
|
15
|
+
aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560
|
16
|
+
ZXUCTe/LCaIhUdib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j
|
17
|
+
+ao6hnO2RlNYyIkFvYMRuHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/
|
18
|
+
BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBlkKyID1bZ5jA01CbH0FDxkt5r1DmI
|
19
|
+
CSLGpmODA/eZd9iy5Ri4XWPz1HP7bJyZePFLeH0ZJMMrAoT4vCLZiiLXoPxx7JGH
|
20
|
+
IPG47LHlVYCsPVLIOQ7C8MAFT9aCdYy9X9LcdpoFEsmvcsPcJX6kTY4XpeCHf+Ga
|
21
|
+
WuFg3GQjPEIuTQ==
|
22
|
+
-----END CERTIFICATE-----
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: trust_me
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Joshua Priddle
|
8
|
+
- Justin Mazzi
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '3.1'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '3.1'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: webmock
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - '='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.20.4
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.20.4
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rake-tomdoc
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - '='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 0.0.2
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - '='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.0.2
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
description:
|
71
|
+
email:
|
72
|
+
- jpriddle@site5.com
|
73
|
+
- jmazzi@gmail.com
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- README.markdown
|
79
|
+
- Rakefile
|
80
|
+
- lib/trust_me.rb
|
81
|
+
- lib/trust_me/version.rb
|
82
|
+
- spec/fixtures/verify-call-success.json
|
83
|
+
- spec/fixtures/verify-sms-success.json
|
84
|
+
- spec/spec_helper.rb
|
85
|
+
- spec/trust_me_spec.rb
|
86
|
+
- vendor/cacert.pem
|
87
|
+
homepage: https://github.com/site5/trust_me
|
88
|
+
licenses:
|
89
|
+
- MIT
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.2.2
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: 'TrustMe: Wrapper for the TeleSign REST API'
|
111
|
+
test_files: []
|
112
|
+
has_rdoc:
|