Class: LogPusher::AuthKey

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

Instance Method Summary collapse

Constructor Details

#initialize(email, password) ⇒ AuthKey

Returns a new instance of AuthKey.



9
10
11
12
13
# File 'lib/logpusher/authkey.rb', line 9

def initialize(email, password)
  raise "The type of email parameter must consist of the Email object." unless email.is_a?(Email)
  @email = email.get
  @hashed_password = Digest::MD5.hexdigest password
end

Instance Method Details

#get_auth_keyObject



15
16
17
18
# File 'lib/logpusher/authkey.rb', line 15

def get_auth_key
  auth_key = create_auth_key_string
  Base64.strict_encode64 auth_key
end