Class: HonestRenter::AddressPasswordAuthenticator
- Inherits:
-
Authenticator
- Object
- Authenticator
- HonestRenter::AddressPasswordAuthenticator
- Defined in:
- lib/authenticator.rb
Instance Method Summary collapse
Methods inherited from Authenticator
from_address_and_password, from_secret_key_member_id, #initialize, #renew!, #session
Constructor Details
This class inherits a constructor from HonestRenter::Authenticator
Instance Method Details
#after_initialize(address, password) ⇒ Object
59 60 61 62 |
# File 'lib/authenticator.rb', line 59 def after_initialize(address, password) @address = address @password = password end |
#build_session ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/authenticator.rb', line 64 def build_session raw_session = HonestRenter::Post.new('members/session', address: @address, password: @password) .call HonestRenter::Session.new( raw_session.headers['honr-authentication-token'], raw_session.headers['honr-session'] ) end |