class LogPusher::AuthKey
Public Class Methods
new(email, password)
click to toggle source
# 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
Public Instance Methods
get_auth_key()
click to toggle source
# File lib/logpusher/authkey.rb, line 15 def get_auth_key auth_key = create_auth_key_string Base64.strict_encode64 auth_key end
Private Instance Methods
create_auth_key_string()
click to toggle source
# File lib/logpusher/authkey.rb, line 22 def create_auth_key_string "#{@email}#{SEPERATOR}#{@hashed_password}#{SEPERATOR}#{Time.now.strftime(DATE_FORMAT)}" end