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 |
# 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" => { "class" => 'Soar::Registry::Directory::Provider::Stub', "config" => { "table" => "identity", "index" => ["uuid", "email"] } }, "customer" => {}, "domain" => {} } }) end |
Instance Method Details
#given_authenticated_identifier ⇒ Nil
42 43 44 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 42 def given_authenticated_identifier @entry["email"] end |
#given_existing_identity ⇒ Nil
35 36 37 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 35 def given_existing_identity @identity.directory.put(@entry) end |
#request_uuid ⇒ Nil
49 50 51 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 49 def request_uuid @identity.uuid end |
#role? ⇒ Boolean
63 64 65 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 63 def role? @identity.role == 'staff' end |
#uuid? ⇒ Boolean
56 57 58 |
# File 'lib/soar/authentication/identity/test/orchestration_provider/staff.rb', line 56 def uuid? @entry["uuid"] == @identity.uuid end |