Class: LogPusher::AuthKey
- Inherits:
-
Object
- Object
- LogPusher::AuthKey
- Defined in:
- lib/logpusher/authkey.rb
Instance Method Summary collapse
- #get_auth_key ⇒ Object
-
#initialize(email, password) ⇒ AuthKey
constructor
A new instance of AuthKey.
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_key ⇒ Object
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 |