soar-registry-identity 0.0.1 → 1.0.0
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 +4 -4
- data/README.md +29 -10
- data/lib/soar/registry/identity.rb +2 -2
- data/lib/soar/registry/identity/model.rb +1 -1
- data/lib/soar/registry/identity/provider/staff/base.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9437adb33b4379cc43f32fd3114f5747f232f6c8
|
4
|
+
data.tar.gz: 8da8b86504e04fe071dc025023ce0dd09df82a16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a8048aaeb8838dbe4addf80b864b2792790a7ad13ea432c8aa244feee4f807b409498cb859d8c3e206181643c2049b3d6402681f6ac7e81e1a0cdddcae19821
|
7
|
+
data.tar.gz: a35ba39309eee4ed3ded67690cca8090f52b09e906b17ab4bfb039eef8a98998948c42d442d87e94aad131a9690c26a5dd36ce6974a6c903f2586734b215b4b3
|
data/README.md
CHANGED
@@ -2,44 +2,63 @@
|
|
2
2
|
|
3
3
|
## Quickstart
|
4
4
|
|
5
|
+
### Example data
|
6
|
+
```javascript
|
7
|
+
"identities" = [{
|
8
|
+
"uuid": "identity-62936e70-1815-439b-bf89-8492855a7e6b",
|
9
|
+
"entity_id": "entity-2d931510-d99f-494a-8c67-87feb05e1594",
|
10
|
+
"email": "test+publisher@hetzner.co.za",
|
11
|
+
"roles": {
|
12
|
+
"staff": {
|
13
|
+
"department": "technical"
|
14
|
+
},
|
15
|
+
"configuration_publisher": {
|
16
|
+
"configuration_identifiers": ["*"]
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}]
|
20
|
+
```
|
21
|
+
|
5
22
|
### Directory
|
6
23
|
Create a directory provider
|
7
24
|
|
8
25
|
```ruby
|
9
26
|
require 'soar/registry/directory'
|
10
|
-
directory_provider = Soar::Registry::Directory::Provider::Stub.new
|
27
|
+
directory_provider = Soar::Registry::Directory::Provider::Stub.new(
|
28
|
+
table: "identities",
|
29
|
+
primary_key: "uuid",
|
30
|
+
index: ["uuid", "entity_id", "email"]
|
31
|
+
)
|
11
32
|
```
|
12
33
|
|
13
34
|
Create a directory
|
14
35
|
```ruby
|
15
|
-
directory = Soar::Registry::Directory.new(
|
16
|
-
provider: directory_provider
|
17
|
-
})
|
36
|
+
directory = Soar::Registry::Directory.new(directory_provider)
|
18
37
|
```
|
19
38
|
|
20
39
|
### Staff UUID IDR
|
21
40
|
Search for staff by UUID.
|
22
41
|
|
23
|
-
Create an identity provider.
|
42
|
+
Create an identity provider.
|
24
43
|
```ruby
|
25
44
|
require 'soar/registry/identity'
|
26
|
-
identity_provider = Soar::Registry::Identity::Provider::Staff::Id.new(directory)
|
45
|
+
identity_provider = Soar::Registry::Identity::Provider::Staff::Id.new(directory: directory)
|
27
46
|
```
|
28
47
|
|
29
48
|
Create an IDR
|
30
49
|
```ruby
|
31
|
-
@id_idr = Soar::Registry::Identity.new(
|
50
|
+
@id_idr = Soar::Registry::Identity.new(identity_provider)
|
32
51
|
```
|
33
52
|
|
34
53
|
### Staff Email IDR
|
35
|
-
Search for staff by email address.
|
54
|
+
Search for staff by email address.
|
36
55
|
```ruby
|
37
56
|
require 'soar/registry/identity'
|
38
|
-
identity_provider = Soar::Registry::Identity::Provider::Staff::Email.new(directory)
|
57
|
+
identity_provider = Soar::Registry::Identity::Provider::Staff::Email.new(directory: directory)
|
39
58
|
```
|
40
59
|
|
41
60
|
```ruby
|
42
|
-
@email_idr = Soar::Registry::Identity.new(
|
61
|
+
@email_idr = Soar::Registry::Identity.new(identity_provider)
|
43
62
|
```
|
44
63
|
|
45
64
|
### Getting a list of identifiers
|
@@ -3,8 +3,8 @@ require 'soar/registry/identity/model'
|
|
3
3
|
module Soar
|
4
4
|
module Registry
|
5
5
|
module Identity
|
6
|
-
def self.new(provider
|
7
|
-
Soar::Registry::Identity::Model.new(provider
|
6
|
+
def self.new(provider)
|
7
|
+
Soar::Registry::Identity::Model.new(provider)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soar-registry-identity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Mulder
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0
|
33
|
+
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0
|
40
|
+
version: 1.0.0
|
41
41
|
description: Registry of identities
|
42
42
|
email: charles.mulder@hetzner.co.za
|
43
43
|
executables: []
|