safe-t-rest 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 1c7726fa369a42727abc2b1bfadff0901941fdb3
4
- data.tar.gz: 31f1271285bf8204dca4cd6f574ad9529af1e07a
3
+ metadata.gz: 5a7084c85257e3b30ce0b270fe91a5648fded1c4
4
+ data.tar.gz: a530fd5cb791b6ade71ae6cb860336ef35d94fda
5
5
  SHA512:
6
- metadata.gz: 085c935328c14f7bf362a44eea6377fdb2c30eb415942622bf4a6cd6e835a5a594e554fb40cabe6a40ccf09fee5127c34a31bc54a0f6a4eafa85bc53ca9c1a46
7
- data.tar.gz: c1b68a16bc185668590118517db7507d4b3ab97ceea886d0d16ede79dc40ddf5229e2863fca6a206cf6e34ba38a66ff515fa73f0e1e2705747456318fa3b752c
6
+ metadata.gz: 8a4aea525734df09b13202cb178bc0281276c0be2ecb51d82c3137dc077520ad85912ecc33b9f9b8bc5af867395096f8d84e6b9ae31ec87ffd9e14c383f2bec9
7
+ data.tar.gz: 8157266c55d06d5e9f9fc90d67165c2ebfe17fa7fb6acc8b87a8bc33021e7498fbafd1a04c628a3b0c0d779f323fce776652fb75620cace8b5e4dbf08a0171f7
@@ -1,5 +1,5 @@
1
1
  require 'rest-client'
2
-
2
+ require 'base64'
3
3
 
4
4
 
5
5
  class SafeTRest
@@ -26,4 +26,16 @@ class SafeTRest
26
26
  }
27
27
  )
28
28
  end
29
+
30
+ def iVerifyUserAccount
31
+ a = RestClient::Request.execute(
32
+ :method => :post,
33
+ :url => @url,
34
+ :headers => {
35
+ :servletRequestID => 'MethodRequest',
36
+ :BusinessLogic => "{Username:'#{@username}', Passowrd:'#{@password}', RoleID: '#{@role_id}', ExtensionID: '#{@extenstion_id}', iVerifyUserAccount: ['#{@username}', '#{@password}', true]}"
37
+ }
38
+ ).split(':')
39
+ return [a[0], Base64.decode64(a[1])].join(':')
40
+ end
29
41
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'safe-t-rest'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.date = Time.now.strftime('%Y-%m-%d')
5
5
  s.summary = 'A ruby gem to interact with Safe-T Box.'
6
6
  s.description = 'Ruby gem to interact with Safe-T Box rest API. '
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safe-t-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bar Hofesh