Module: Authenticator::Client
- Defined in:
- lib/authenticator/client.rb,
lib/authenticator/client/base.rb,
lib/authenticator/client/mock.rb,
lib/authenticator/client/account.rb,
lib/authenticator/client/version.rb,
lib/authenticator/client/authenticate_response.rb
Defined Under Namespace
Classes: Account, AuthenticateResponse, Base, Mock
Constant Summary
collapse
- VERSION =
"0.0.3"
- @@configs =
{}
- @@stubbed_account =
nil
Class Method Summary
collapse
Class Method Details
.authenticate_with!(account) ⇒ Object
30
31
32
|
# File 'lib/authenticator/client.rb', line 30
def self.authenticate_with!(account)
@@stubbed_account = account
end
|
.new(key) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/authenticator/client.rb', line 18
def self.new(key)
if @@stubbed_account
Mock.new(@@stubbed_account)
else
Base.new(@@configs[key], @@stubbed_account)
end
end
|
.register_config(key, config) ⇒ Object
14
15
16
|
# File 'lib/authenticator/client.rb', line 14
def self.register_config(key, config)
@@configs[key] = config
end
|
.reset! ⇒ Object
26
27
28
|
# File 'lib/authenticator/client.rb', line 26
def self.reset!
@@stubbed_account = nil
end
|