soar-authentication-identity_uuid_translator 2.0.0 → 3.0.0

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: a29b29bc17bf8cd91f45651374f92983feb9ecf9
4
- data.tar.gz: 38cd2f73e28e093e3ce66ed23c4d54506fb0b498
3
+ metadata.gz: 42fd8d3d66dfa86a49ab5f50af5a0b77dd64d8c1
4
+ data.tar.gz: 31f134e18c8d55523cc5378345ac83240b9c2439
5
5
  SHA512:
6
- metadata.gz: 16f88064bb51ab5e050165d5ff4dde7593a9c210f83bc22d53d4208a8a162b5787ee34f72634f012be261a081073fe333026e1b8a5a4387bb64ebb3db751aecd
7
- data.tar.gz: fb47813a11ba89fa57639f81afbe3b12fd8cebed4c31e160d31f62021ca8df7c54cb11d4aabb0d8445ff41aa8752ad460ab069037e7b6b1492e91f0dd8087d85
6
+ metadata.gz: ec042766a4395566fc7d5b3a96e00d4c42460d757b882212cd8ff8bc4be232b2d800d1d242d17bc1034c0ce95ed2dbabb937b56bf3a843c383f2b4a0b8291ed1
7
+ data.tar.gz: 598cd5e28fa0fd7f84290a58d46a549d0aeb45d14dbf5fbb7588b39d3417aa8b3a5141801ec1e0c47e2c7bf0509ebc26ede1067021a134c66337f51e347693b7
data/.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "soar-authentication-identity_uuid_translator"
3
- spec.version = "2.0.0"
3
+ spec.version = "3.0.0"
4
4
  spec.authors = ["Charles Mulder"]
5
5
  spec.email = ["charles.mulder@hetzner.co.za"]
6
6
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
11
11
  spec.require_paths = ["lib"]
12
12
 
13
- spec.add_runtime_dependency 'soar-registry-identity', '~> 5.0'
13
+ spec.add_runtime_dependency 'soar-registry-identity', '~> 6.0'
14
14
  spec.add_runtime_dependency 'object_selector', '~> 1.0', '>= 1.0.2'
15
15
  spec.add_runtime_dependency 'uuidtools', '~> 2.1', '>= 2.1.5'
16
16
  end
@@ -9,8 +9,8 @@ module Soar
9
9
 
10
10
  def given_existing_role_and_attributes
11
11
  @roles_directory.put({
12
- "identity_uuid" => Soar::Authentication::IdentityUuidTranslator::UuidGenerator.generate("#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity[:ID]}"),
13
- "identity_source" => "#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity[:ID]}",
12
+ "identity_uuid" => Soar::Authentication::IdentityUuidTranslator::UuidGenerator.generate("#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity['ID']}"),
13
+ "identity_source" => "#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity['ID']}",
14
14
  "identity_role" => Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE,
15
15
  "identity_role_attributes" => [Faker::Number.unique.number(10)].compact
16
16
  })
@@ -22,7 +22,7 @@ module Soar
22
22
  "identity_role" => Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE
23
23
  }
24
24
  identity = @roles_directory.fetch(primary_key)
25
- return identity['identity_source'] == "#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity[:ID]}"
25
+ return identity['identity_source'] == "#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity['ID']}"
26
26
  end
27
27
 
28
28
  def role?
@@ -32,14 +32,14 @@ module Soar
32
32
  "identity_role" => Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE
33
33
  }
34
34
  identity = @roles_directory.fetch(primary_key)
35
- (identity['identity_role'] == Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE) && (identity['identity_role_attributes']['profiles'].include?(@identity[:Client_Number]))
35
+ (identity['identity_role'] == Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE) && (identity['identity_role_attributes']['profiles'].include?(@identity['Client_Number']))
36
36
  rescue Soar::Registry::Directory::Error::NoEntriesFoundError => e
37
37
  return false
38
38
  end
39
39
  end
40
40
 
41
41
  def uuid?
42
- @uuid == Soar::Authentication::IdentityUuidTranslator::UuidGenerator.generate("#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity[:ID]}")
42
+ @uuid == Soar::Authentication::IdentityUuidTranslator::UuidGenerator.generate("#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity['ID']}")
43
43
  end
44
44
 
45
45
  end
@@ -36,9 +36,9 @@ module Soar
36
36
 
37
37
  def given_existing_identity
38
38
  @identity = {
39
- ID: Faker::Number.number(4),
40
- Notifyemail_Invoice: Faker::Internet.email,
41
- Client_Number: @identifier
39
+ 'ID' => Faker::Number.number(4),
40
+ 'Notifyemail_Invoice' => Faker::Internet.email,
41
+ 'Client_Number' => @identifier
42
42
  }
43
43
  @directory.put(@identity)
44
44
  end
@@ -36,9 +36,9 @@ module Soar
36
36
 
37
37
  def given_existing_identity
38
38
  @identity = {
39
- ID: Faker::Number.number(4),
40
- Notifyemail_Invoice: @identifier,
41
- Client_Number: "C#{Faker::Number.unique.number(10)}"
39
+ 'ID' => Faker::Number.number(4),
40
+ 'Notifyemail_Invoice' => @identifier,
41
+ 'Client_Number' => "C#{Faker::Number.unique.number(10)}"
42
42
  }
43
43
  @directory.put(@identity)
44
44
  end
@@ -14,15 +14,15 @@ module Soar
14
14
  def given_existing_identity
15
15
  begin
16
16
  @identity = {
17
- dn: "cn=John Smith,#{@identity_directory_configuration['config']['base']}",
18
- attributes: {
19
- cn: "John Smith",
20
- mail: @identifier,
21
- objectclass: ["inetOrgPerson", "top"],
22
- sn: "Smith"
17
+ 'dn' => "cn=John Smith,#{@identity_directory_configuration['config']['base']}",
18
+ 'attributes' => {
19
+ 'cn' => "John Smith",
20
+ 'mail' => @identifier,
21
+ 'objectclass' => ["inetOrgPerson", "top"],
22
+ 'sn' => "Smith"
23
+ }
23
24
  }
24
- }
25
- @identity_directory.provider.delete(@identity[:dn])
25
+ @identity_directory.provider.delete(@identity['dn'])
26
26
  @identity_directory.put(@identity)
27
27
  rescue Soar::Registry::Directory::Error::DuplicateEntryError => e
28
28
  true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar-authentication-identity_uuid_translator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Mulder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2017-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: soar-registry-identity
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '6.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.0'
26
+ version: '6.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: object_selector
29
29
  requirement: !ruby/object:Gem::Requirement