Class: SignIn::AuthenticationServiceRetriever
- Inherits:
-
Object
- Object
- SignIn::AuthenticationServiceRetriever
- Defined in:
- app/services/sign_in/authentication_service_retriever.rb
Instance Attribute Summary collapse
-
#client_config ⇒ Object
readonly
Returns the value of attribute client_config.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, client_config: nil) ⇒ AuthenticationServiceRetriever
constructor
A new instance of AuthenticationServiceRetriever.
- #perform ⇒ Object
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_config ⇒ Object (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 |
#type ⇒ Object (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
#perform ⇒ Object
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 |