Class: HonestRenter::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/authenticator.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#sessionObject



17
18
19
# File 'lib/authenticator.rb', line 17

def session
  @session ||= build_session
end