scooter 4.5.0 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28d921bb29a43c1a54b237177b9f614c934cf312449dace635c97fe315018aa
|
4
|
+
data.tar.gz: dea1e7ed4177988ad032d1bed17f277eef7b3e724d1064e8fbf8248fd63e764b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92c27de1b5fd63ce3bd588332e5befa893b4d15f854bec459e5097ac22d6d857a60899bd46a3e3856541d5d66d4644d993deb6113b93dc92f6eb19bb9f24812b
|
7
|
+
data.tar.gz: 6147ef6db76ecc15f3063d6c07368978388f111f2a06d927120e35a26cf2dc888b05b968c3cc4b4d4730a81d1e948a01731843db0756a8bcc51cd03f2e7c074d
|
data/README.md
CHANGED
@@ -88,8 +88,15 @@ module Scooter
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def signin(login=self.credentials.login, password=self.credentials.password)
|
91
|
+
response = @connection.get "/auth/login" do |request|
|
92
|
+
connection.port = 443
|
93
|
+
end
|
94
|
+
return response if response.status != 200
|
95
|
+
# extract the session cookie, if it is present
|
96
|
+
cookie = response.headers['Set-Cookie']
|
91
97
|
response = @connection.post "/auth/login" do |request|
|
92
98
|
request.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
|
99
|
+
request.headers['Cookie'] = cookie if cookie
|
93
100
|
request.body = "username=#{login}&password=#{CGI.escape(password)}"
|
94
101
|
connection.port = 443
|
95
102
|
end
|
@@ -27,7 +27,7 @@ module Scooter
|
|
27
27
|
display_name = options['display_name'] || RandomString.generate(8)
|
28
28
|
login = options['login'] || RandomString.generate(16)
|
29
29
|
role_ids = options['role_ids'] || []
|
30
|
-
password = options['password'] || '
|
30
|
+
password = options['password'] || 'Puppetlabs-1'
|
31
31
|
|
32
32
|
user_hash = { 'email' => email,
|
33
33
|
'display_name' => display_name,
|
data/lib/scooter/version.rb
CHANGED
@@ -28,6 +28,12 @@ module Scooter
|
|
28
28
|
|
29
29
|
context '"signin with a page that returns a token' do
|
30
30
|
before do
|
31
|
+
stub_request(:get, /auth\/login/).
|
32
|
+
to_return(status: 200,
|
33
|
+
body: '',
|
34
|
+
headers: {
|
35
|
+
"set-cookie"=>"__HOST-somecookie=something;Secure;Path=/",
|
36
|
+
})
|
31
37
|
stub_request(:post, /auth\/login/).
|
32
38
|
to_return(status: 200,
|
33
39
|
body: '',
|
@@ -35,7 +41,7 @@ module Scooter
|
|
35
41
|
"date"=>"Tue, 29 Nov 2016 22:05:41 GMT",
|
36
42
|
"content-length"=>"0",
|
37
43
|
"connection"=>"close",
|
38
|
-
"set-cookie"=>"
|
44
|
+
"set-cookie"=>"__HOST-pl_ssti=0CeHhpz5PPLna7kpaEMcTHjJ62z9eizHTzsxEXNK8W20;Secure;Path=/",
|
39
45
|
"location"=>"/",
|
40
46
|
"x-frame-options"=>"DENY"})
|
41
47
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scooter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.
|
4
|
+
version: 4.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|