Class: Soar::Authentication::Identity::Test::OrchestrationProvider::Staff
- Inherits:
-
Object
- Object
- Soar::Authentication::Identity::Test::OrchestrationProvider::Staff
- Defined in:
- lib/soar/authentication/identity/test/orchestration_provider/staff.rb
Instance Method Summary collapse
- #given_authenticated_identifier ⇒ Nil
- #given_existing_identity ⇒ Nil
-
#initialize ⇒ Staff
constructor
A new instance of Staff.
- #request_uuid ⇒ Nil
- #role? ⇒ Boolean
- #uuid? ⇒ Boolean
Constructor Details
#initialize ⇒ Staff
Returns a new instance of Staff.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 11 def initialize @entry = { "uuid" => SecureRandom.uuid, "email" => '[email protected]' } @identity = Soar::Authentication::Identity::Factory.create({ authenticated_identifier: @entry["email"], directory_configurations: { "staff" => { "provider" => 'Soar::Registry::Directory::Provider::Stub', "config" => { "table" => "identity", "primary_key" =>"uuid", "index" => ["uuid", "email"] } }, "customer" => {}, "domain" => {} } }) end |
Instance Method Details
#given_authenticated_identifier ⇒ Nil
43 44 45 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 43 def given_authenticated_identifier @entry["email"] end |
#given_existing_identity ⇒ Nil
36 37 38 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 36 def given_existing_identity @identity.directory.put(@entry) end |
#request_uuid ⇒ Nil
50 51 52 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 50 def request_uuid @identity.uuid end |
#role? ⇒ Boolean
64 65 66 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 64 def role? @identity.role == 'staff' end |
#uuid? ⇒ Boolean
57 58 59 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 57 def uuid? @entry["uuid"] == @identity.uuid end |