Class: HonestRenter::Authenticator
- Inherits:
-
Object
- Object
- HonestRenter::Authenticator
- Defined in:
- lib/authenticator.rb
Direct Known Subclasses
AddressPasswordAuthenticator, SecretKeyMemberIdAuthenticator
Class Method Summary collapse
- .from_address_and_password(address, password) ⇒ Object
- .from_secret_key_member_id(secret_key, member_id) ⇒ Object
Instance Method Summary collapse
-
#initialize(*args) ⇒ Authenticator
constructor
A new instance of Authenticator.
- #renew! ⇒ Object
- #session ⇒ Object
Constructor Details
#initialize(*args) ⇒ Authenticator
Returns a new instance of Authenticator.
13 14 15 |
# File 'lib/authenticator.rb', line 13 def initialize(*args) after_initialize(*args) end |
Class Method Details
.from_address_and_password(address, password) ⇒ Object
8 9 10 |
# File 'lib/authenticator.rb', line 8 def from_address_and_password(address, password) AddressPasswordAuthenticator.new(address, password) end |
.from_secret_key_member_id(secret_key, member_id) ⇒ Object
4 5 6 |
# File 'lib/authenticator.rb', line 4 def from_secret_key_member_id(secret_key, member_id) SecretKeyMemberIdAuthenticator.new(secret_key, member_id) end |
Instance Method Details
#renew! ⇒ Object
21 22 23 24 |
# File 'lib/authenticator.rb', line 21 def renew! @session = nil session end |
#session ⇒ Object
17 18 19 |
# File 'lib/authenticator.rb', line 17 def session @session ||= build_session end |