getty_connect_authentication 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bc93bfc20c9b9348727b2ad713f6d987ffe31ae
|
4
|
+
data.tar.gz: 102f9dc9ebc56cd65108af9f42b06ea71aed9624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00f1634ef0511185f327087e971f220e703eb88cbeda178300693fa5c14587417f6e470106945e9286d81edced3c45450060c905a1c7bee0f6efcb4ad4e1bbed
|
7
|
+
data.tar.gz: 35904502b510bd2b4c1ed6e90eb8ab09bb5005347b00bb88aaf807d44bd367431553baedd0107818e848e001f43589db0aa77e3732d0999e999dc64b39800241
|
@@ -16,7 +16,9 @@ module GettyConnectAuthentication
|
|
16
16
|
body = {
|
17
17
|
client_id: Configuration.id,
|
18
18
|
client_secret: Configuration.secret,
|
19
|
-
grant_type: 'client_credentials'
|
19
|
+
grant_type: 'client_credentials',
|
20
|
+
username: Configuration.username,
|
21
|
+
password: Configuration.password
|
20
22
|
}
|
21
23
|
|
22
24
|
request = Net::HTTP::Post.new(uri.request_uri)
|
data/spec/getty/connect_spec.rb
CHANGED
@@ -25,7 +25,8 @@ describe GettyConnectAuthentication do
|
|
25
25
|
GettyConnectAuthentication.token
|
26
26
|
|
27
27
|
a_request(:post, url).
|
28
|
-
with(body: "client_id=my_id&client_secret=my_secret&grant_type=client_credentials").
|
28
|
+
with(body: "client_id=my_id&client_secret=my_secret&grant_type=client_credentials&username=my_username&password=my_password").
|
29
|
+
should have_been_made.once
|
29
30
|
end
|
30
31
|
|
31
32
|
it 'sets expires to current timestamp plus response expires_in value' do
|