soar-authentication-identity 0.0.2 → 0.0.3

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: 5f8914d86bf3c5ca1985aef4f44b3a9350d6d3d5
4
- data.tar.gz: db528744d5b6cffd9cd4184138eb4c80ef20f73f
3
+ metadata.gz: dd63186e2e111e388f77b75ee26c8a6ad7f3ad53
4
+ data.tar.gz: b4371252fb201b45d1ee376becf04f3b7ee764ff
5
5
  SHA512:
6
- metadata.gz: 5475f3261b034b1eeac56233f669c4a8162db6e162b541b8fd4297cc71486cd122992f11fc0bf79c4d7b71d88d90f54623d79595ab4c7ec8142722ae453f392d
7
- data.tar.gz: 942a55d59f9b2fce174699c6cd44d7d71278a9a5e01973843c6cde062be9d1b3c6aaf042dd34b4b427efc6fe0dc9b9357a8875ffc38ee87bf2a7e2ff2032a62d
6
+ metadata.gz: 5fec6812042d56be91618783df2a0a70443806f7c235541dac6ffa083a305065692126236348df5b91682005f6d3e8efd0f1cd9ab9c64797eb4af17258098888
7
+ data.tar.gz: 727d9ded2e75656b3decce1c203cfa52201273df265305d9630305e82c7d61deebf2d69c92013ac3ea00175a6c0ea0f0c2a9e22d28e68886dd5ee121bdae45a3
data/.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "soar-authentication-identity"
3
- spec.version = "0.0.2"
3
+ spec.version = "0.0.3"
4
4
  spec.authors = ["Charles Mulder"]
5
5
  spec.email = ["charles.mulder@hetzner.co.za"]
6
6
 
data/README.md CHANGED
@@ -10,7 +10,7 @@ Used by authentication service to translate an identity identifier into an UUID
10
10
  Example using the factory.
11
11
  ```ruby
12
12
  > identity = Soar::Authentication::Identity::Factory.create({
13
- authenticated_identifier: 'the authenticated identifier goes here',
13
+ authenticated_identifier: 'test@hetzner.co.za',
14
14
  directory_configurations: {
15
15
  "staff" => {
16
16
  "provider" => 'Soar::Registry::Directory::Provider::Stub',
@@ -26,6 +26,8 @@ Example using the factory.
26
26
  })
27
27
  > puts identity.uuid
28
28
  "85777bfa-b743-4ba9-8308-e8a1e4d44fbe"
29
+ > puts identity.role
30
+ 'staff'
29
31
  ```
30
32
 
31
33
  ## Tests
@@ -17,6 +17,10 @@ module Soar
17
17
  @provider.uuid
18
18
  end
19
19
 
20
+ def role
21
+ @provider.role
22
+ end
23
+
20
24
  def directory
21
25
  @provider.directory
22
26
  end
@@ -21,6 +21,10 @@ module Soar
21
21
  attributes[primary_key]
22
22
  end
23
23
 
24
+ def role
25
+ "staff"
26
+ end
27
+
24
28
  end
25
29
  end
26
30
  end
@@ -18,6 +18,10 @@ module Soar
18
18
  @entries[0][primary_key]
19
19
  end
20
20
 
21
+ def role
22
+ "stub"
23
+ end
24
+
21
25
  end
22
26
  end
23
27
  end
@@ -58,6 +58,13 @@ module Soar
58
58
  @entry["uuid"] == @identity.uuid
59
59
  end
60
60
 
61
+ ##
62
+ # @return [Boolean]
63
+ ##
64
+ def role?
65
+ @identity.role == 'staff'
66
+ end
67
+
61
68
  end
62
69
  end
63
70
  end
@@ -56,6 +56,10 @@ module Soar
56
56
  @entry["uuid"] == @identity.uuid
57
57
  end
58
58
 
59
+ def role?
60
+ @identity.role == 'stub'
61
+ end
62
+
59
63
  end
60
64
  end
61
65
  end
@@ -38,6 +38,13 @@ module Soar
38
38
  @provider.uuid?
39
39
  end
40
40
 
41
+ ##
42
+ # @return [Boolean]
43
+ ##
44
+ def role?
45
+ @provider.role?
46
+ end
47
+
41
48
  end
42
49
  end
43
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar-authentication-identity
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
  - Charles Mulder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-05 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: soar-registry-identity