leaseweb-rest-api 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/leaseweb-rest-api.gemspec +1 -1
- data/lib/leaseweb-rest-api.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d1dc51e864d30b49c856ed7a4c4b039dd941907
|
4
|
+
data.tar.gz: 9f36f39ff7b4db041290b27308f6b74eac77863d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 343ad233ac49edb30986a599c31f263c92a564eba73c2b667327bdd99f1fed9b255e350c8300bb60f69a590058cb4ab1eb3fdecca8c6508c552aed9795627acf
|
7
|
+
data.tar.gz: 4ff4fb368ff4d31a78631b5a25a2f8ee903f2b5191c4931db2b4227412ef66fdb610f8771db7cdb42970e7935160139f0b8c232de0a76b703968452cf4c45060
|
data/leaseweb-rest-api.gemspec
CHANGED
data/lib/leaseweb-rest-api.rb
CHANGED
@@ -24,6 +24,13 @@ class LeasewebAPI
|
|
24
24
|
@options = { headers: { 'Authorization' => "Bearer #{access_token}" } }
|
25
25
|
end
|
26
26
|
|
27
|
+
def getPasswordToken(username, password, client_id, client_secret)
|
28
|
+
response = self.class.post('https://auth.leaseweb.com/token', basic_auth: { username: client_id, password: client_secret }, body: { grant_type: 'password', username: username, password: password })
|
29
|
+
access_token = response.parsed_response['access_token']
|
30
|
+
|
31
|
+
@options = { headers: { 'Authorization' => "Bearer #{access_token}" } }
|
32
|
+
end
|
33
|
+
|
27
34
|
def readPrivateKey(privateKey, password)
|
28
35
|
@private_key = OpenSSL::PKey::RSA.new(File.read(privateKey), password)
|
29
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leaseweb-rest-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnoud Vermeer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
91
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.
|
92
|
+
rubygems_version: 2.6.8
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: Leaseweb REST API client for Ruby
|