soar_authentication_token 3.0.4 → 3.0.5

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: b7a5851636f151fe4e53aee3b39e00979c381c52
4
- data.tar.gz: 5adc2311057e4b9741e99fd9e1f6898e130ed40d
3
+ metadata.gz: e7996fa1857b1b57684079260f326c2f706a0f78
4
+ data.tar.gz: 44ccf374373fbc7d6596fd1638e2e4016d0f7cee
5
5
  SHA512:
6
- metadata.gz: d5170c9ffd3ca18f25fe1c75c00069fbe164d87c3b08102935cb02e1f30155ef346c591678f7f3a140dea2cbc16207d9fed20e3f66a4698f8f8ce3c8aa08f9ee
7
- data.tar.gz: 73f8fe873c2ab78be3aacf893562ecfa8664418b7cb68cd1688bfdd63b08945eeb19066ac9ea295d122cea25ab12cdf7589c80917d3c10f2a094ac015bc805c6
6
+ metadata.gz: 64764a63384c843c5bf5c056f2a1f479b72c234f42d2d2ba3daa55690b60627eff2446580910ab007952dd432ec31256b6794af979041977f83f5f733f69315f
7
+ data.tar.gz: a385a5cf6a96bb4b927b924844417e5551e75a8085fda8fb8fd18670cedbbdf5dcbb550d01a46284fc8e7bb2fa48158745625b5794be9d525681e2435222d6c6
@@ -5,6 +5,7 @@ require 'time'
5
5
  require 'net/http'
6
6
  require 'uri'
7
7
  require 'json'
8
+ require 'authenticated_client'
8
9
 
9
10
  module SoarAuthenticationToken
10
11
  class TokenGenerator
@@ -42,7 +43,7 @@ module SoarAuthenticationToken
42
43
  end
43
44
 
44
45
  def authenticated_client(authenticated_identifier,flow_identifier)
45
- client = SoarAuthenticationToken::AuthenticatedClient.new
46
+ client = AuthenticatedClient::Client.new
46
47
  client.url = @configuration['generator-url']
47
48
  client.token = @configuration['generator-client-auth-token']
48
49
  client.verb = :post
@@ -1,3 +1,3 @@
1
1
  module SoarAuthenticationToken
2
- VERSION = '3.0.4'
2
+ VERSION = '3.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_authentication_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barney de Villiers
@@ -206,7 +206,6 @@ files:
206
206
  - sanity/sanity.rb
207
207
  - sanity/sanity_benchmark.rb
208
208
  - soar_authentication_token.gemspec
209
- - spec/auth_client_spec.rb
210
209
  - spec/keypair_generator_spec.rb
211
210
  - spec/rack_middleware_spec.rb
212
211
  - spec/spec_helper.rb
@@ -237,7 +236,6 @@ signing_key:
237
236
  specification_version: 4
238
237
  summary: Client library for Hetzner's authentication token service
239
238
  test_files:
240
- - spec/auth_client_spec.rb
241
239
  - spec/keypair_generator_spec.rb
242
240
  - spec/rack_middleware_spec.rb
243
241
  - spec/spec_helper.rb
@@ -1,41 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe SoarAuthenticationToken::AuthenticatedClient do
4
- before :each do
5
- end
6
-
7
- it 'has a version number' do
8
- expect(SoarAuthenticationToken::VERSION).not_to be nil
9
- end
10
-
11
- context "when performing an authenticated request" do
12
- context "with a valid token" do
13
- it 'respond with a successful request' do
14
- @iut = SoarAuthenticationToken::AuthenticatedClient.new
15
- @iut.url = 'http://authentication-token-generator-service:9393/generate'
16
- @iut.token = 'test_ecosystem_token_for_auth_token_aaapi_authenticator_service'
17
- @iut.verb = :post
18
- @iut.parameters = {}
19
- @iut.body = {}
20
- @iut.auditing = nil
21
-
22
- response = @iut.request
23
- expect(response.code).to eq '200'
24
- end
25
- end
26
- context "with an invalid token" do
27
- it 'respond unauthorized' do
28
- @iut = SoarAuthenticationToken::AuthenticatedClient.new
29
- @iut.url = 'http://authentication-token-generator-service:9393/generate'
30
- @iut.token = 'invalid'
31
- @iut.verb = :post
32
- @iut.parameters = {}
33
- @iut.body = {}
34
- @iut.auditing = nil
35
-
36
- response = @iut.request
37
- expect(response.code).to eq '401'
38
- end
39
- end
40
- end
41
- end