Class: Soar::Policy::AccessManager::Test::OrchestrationProvider::ServiceRegistry
- Inherits:
-
Object
- Object
- Soar::Policy::AccessManager::Test::OrchestrationProvider::ServiceRegistry
- Defined in:
- lib/soar/policy/access_manager/test/orchestration_provider/service_registry.rb
Defined Under Namespace
Instance Method Summary collapse
- #authorized ⇒ Object
- #authorized? ⇒ Boolean
- #deny_access ⇒ Object
- #grant_access ⇒ Object
-
#initialize ⇒ ServiceRegistry
constructor
A new instance of ServiceRegistry.
- #no_policy ⇒ Object
- #notification ⇒ Object
Constructor Details
#initialize ⇒ ServiceRegistry
Returns a new instance of ServiceRegistry.
63 64 65 66 67 68 69 |
# File 'lib/soar/policy/access_manager/test/orchestration_provider/service_registry.rb', line 63 def initialize @resource_identifier = 'resource_identifier1' @request = { params: {}, authentication_identifier: 'authentication_identifier1' } end |
Instance Method Details
#authorized ⇒ Object
94 95 96 |
# File 'lib/soar/policy/access_manager/test/orchestration_provider/service_registry.rb', line 94 def @response['data']['approved'] end |
#authorized? ⇒ Boolean
87 88 89 90 91 92 |
# File 'lib/soar/policy/access_manager/test/orchestration_provider/service_registry.rb', line 87 def service_registry = Stub.new(Services.new) model_provider = Soar::Policy::AccessManager::ModelProvider::ServiceRegistry.new(service_registry) model = Soar::Policy::AccessManager::Model.new(model_provider) @response = model.(service_identifier: @service_identifier, resource_identifier: @resource_identifier, request: @request) end |
#deny_access ⇒ Object
75 76 77 |
# File 'lib/soar/policy/access_manager/test/orchestration_provider/service_registry.rb', line 75 def deny_access @service_identifier = 'service_identifier2' end |
#grant_access ⇒ Object
71 72 73 |
# File 'lib/soar/policy/access_manager/test/orchestration_provider/service_registry.rb', line 71 def grant_access @service_identifier = 'service_identifier1' end |
#no_policy ⇒ Object
79 80 81 |
# File 'lib/soar/policy/access_manager/test/orchestration_provider/service_registry.rb', line 79 def no_policy @service_identifier = 'service_identifier3' end |
#notification ⇒ Object
83 84 85 |
# File 'lib/soar/policy/access_manager/test/orchestration_provider/service_registry.rb', line 83 def notification @response['data']['notifications'] end |