jumpcloud 0.2.1 → 0.3.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jumpcloud.rb +6 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 120942931df6bf9d20350844b0f791d3ef86e563
4
- data.tar.gz: 0e44dbc38ad7471827644d28b4a2c5d6514c717b
3
+ metadata.gz: c5479f7ffa3c284aba8fdb67a6009dfcb3d1ecd7
4
+ data.tar.gz: 412e933ffdbdaf3a21b0f5ba97bb64ee0ea609ba
5
5
  SHA512:
6
- metadata.gz: 15d93f96f46d141c12ec1f93acd4c36fe04aa524064ac97168e47ea54cec4bd82d6a2fb77066f857cfabdc8e60931a7b68a93b33e2298660bfbb8bfe8a719f69
7
- data.tar.gz: 0bd365184fc6d45f49bf1247f9266d737b6e67ec20741f875224b4d97206da99a5fc756c86628320c5fdc6321b13d504fef867efbafc88ea84289f4ecb66895e
6
+ metadata.gz: 2f3a0ee6e8c4f2ba33faaa498af6a92cd80fa6443ebfff49bec1fb3427e413f815bbbcd13b38fee345f0098455ec9646ae8311889d90d42120ffb20a7f0e9262
7
+ data.tar.gz: eb07d7f1781ed8f9f3285d1c0adf2d964364f5bb8bb0a193f8250b8afa7951d6bc6b26c80ae0363e1b5413f4c3c8119e59b1a7187b6c167e365b5ce43b33d690
data/lib/jumpcloud.rb CHANGED
@@ -34,6 +34,12 @@ class JumpCloud
34
34
  send_to_server(system_data)
35
35
  end
36
36
 
37
+ def self.set_sshPassEnabled()
38
+ system_data = get_system_data()
39
+ system_data["allowSshPasswordAuthentication"] = true
40
+ send_to_server(system_data)
41
+ end
42
+
37
43
  def self.delete_system()
38
44
  date = get_date
39
45
  system_key = get_key_from_config
@@ -42,8 +48,6 @@ class JumpCloud
42
48
  request = Net::HTTP::Delete.new(uri.request_uri)
43
49
  http = Net::HTTP.new(uri.host, uri.port)
44
50
  http.use_ssl = true
45
- # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
46
- http.ssl_version = :TLSv1_2
47
51
  request["Authorization"] = "Signature keyId=\"system/#{system_key}\",headers=\"request-line date\",algorithm=\"rsa-sha256\",signature=\"#{signature}\""
48
52
  request["Date"] = "#{date}"
49
53
  request["accept"] = "application/json"
@@ -59,8 +63,6 @@ class JumpCloud
59
63
  request = Net::HTTP.new(uri.host, uri.port)
60
64
  http = Net::HTTP.new(uri.host, uri.port)
61
65
  http.use_ssl = true
62
- # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
63
- http.ssl_version = :TLSv1_2
64
66
  request = Net::HTTP::Get.new(uri.request_uri)
65
67
  request["Authorization"] = "Signature keyId=\"system/#{system_key}\",headers=\"request-line date\",algorithm=\"rsa-sha256\",signature=\"#{signature}\""
66
68
  request["Date"] = "#{date}"
@@ -78,8 +80,6 @@ class JumpCloud
78
80
  request = Net::HTTP::Put.new(uri.request_uri)
79
81
  http = Net::HTTP.new(uri.host, uri.port)
80
82
  http.use_ssl = true
81
- # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
82
- http.ssl_version = :TLSv1_2
83
83
  request["Authorization"] = "Signature keyId=\"system/#{system_key}\",headers=\"request-line date\",algorithm=\"rsa-sha256\",signature=\"#{signature}\""
84
84
  request["Date"] = "#{date}"
85
85
  request["accept"] = "application/json"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jumpcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topher Marie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-16 00:00:00.000000000 Z
11
+ date: 2014-10-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Allows simple configuration of a system name and its JumpCloud tags,
14
14
  and allows you to delete a system