Class: SignIn::AuthenticationServiceRetriever

Inherits:
Object
  • Object
show all
Defined in:
app/services/sign_in/authentication_service_retriever.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, client_config: nil) ⇒ AuthenticationServiceRetriever

Returns a new instance of AuthenticationServiceRetriever.



11
12
13
14
# File 'app/services/sign_in/authentication_service_retriever.rb', line 11

def initialize(type:, client_config: nil)
  @type = type
  @client_config = client_config
end

Instance Attribute Details

#client_configObject (readonly)

Returns the value of attribute client_config.



9
10
11
# File 'app/services/sign_in/authentication_service_retriever.rb', line 9

def client_config
  @client_config
end

#typeObject (readonly)

Returns the value of attribute type.



9
10
11
# File 'app/services/sign_in/authentication_service_retriever.rb', line 9

def type
  @type
end

Instance Method Details

#performObject



16
17
18
19
20
21
22
# File 'app/services/sign_in/authentication_service_retriever.rb', line 16

def perform
  if client_config&.mock_auth?
    mock_auth_service
  else
    auth_service
  end
end