wazuh-ruby-client 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: adc2a9b5045731781148915105090a022f56f6a0b9e5f829edbd858ba719cf35
4
- data.tar.gz: 4737d13698d4983280f452d099285c4b5be49d5ee2a8e1e174c260b50ab44327
3
+ metadata.gz: 7975b21b964ccb2675e1b8f873cba88a05cd71b9edbfa9a130c4bdcec6ee5956
4
+ data.tar.gz: 7d5a152cccc4816a4dd1348d65f9c6bfa41c7d94b910bc592acf2c206fe38e2b
5
5
  SHA512:
6
- metadata.gz: 9a2797197ba7db64967a51bfb4993ff42f4928cfd452a73b7629bd7c64e3c1d35f61157eb8191433fd7f21ddde6eefcecead1fd30e95109ac47423439fffd212
7
- data.tar.gz: 12bdc3ff57b5f77b602d87889881f7d46868cf49cdeaa4ef92a0d408ddb8ca90b3a2f06bfed5707bbd8b70c6536db21ed617d1cfe36b6abd37a702d325344917
6
+ metadata.gz: 64a1fc4e4d5dcd7d8f5254dbb0e73d14dccc00f79f52025997eb27b6cdca6d0d8cdd6daa31bbdc9e72660da5aca026eb68a0ac84ee692191de927693d7e61136
7
+ data.tar.gz: 882f1cfee24d294a11e1b31e595df2012a0b93973123555f6263c3f383508e1e9c1866e7f1052615ac52299273547ea07b801303633c1bcb849e2f08693066a2
@@ -24,7 +24,7 @@ module Wazuh
24
24
  case api_version
25
25
  when 3
26
26
  if basic_user || basic_password
27
- options[:headers].merge!({'Authorization' => "Basic " + Base64.encode64(basic_user + ':' + basic_password).strip})
27
+ options[:headers].merge!({'Authorization' => "Basic " + Base64.strict_encode64(basic_user + ':' + basic_password).strip})
28
28
  end
29
29
  when 4
30
30
  raise "user and password is required on v4 api" if !basic_user || !basic_password
@@ -5,7 +5,7 @@ module Wazuh
5
5
  def self.jwt(endpoint, options, basic_user, basic_password)
6
6
  if !@_token || (@_exp && @_exp -3 <= Time.now.to_i)
7
7
  options[:url] = endpoint
8
- options[:headers].merge!({'Authorization' => "Basic " + Base64.encode64(basic_user + ':' + basic_password).strip})
8
+ options[:headers].merge!({'Authorization' => "Basic " + Base64.strict_encode64(basic_user + ':' + basic_password).strip})
9
9
 
10
10
  token = ::Faraday.new(options) {|f| f.response :json }.get('/security/user/authenticate').body['data']['token']
11
11
  @_exp = ::JWT.decode(token, nil, false).first['exp'].to_i
data/lib/wazuh/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Wazuh
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
@@ -1,3 +1,3 @@
1
1
  module WazuhRubyClient
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wazuh-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mrtc0
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-17 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler