Class: Teilashare::Authentication
- Inherits:
-
Object
- Object
- Teilashare::Authentication
- Defined in:
- lib/teilashare/authentication.rb
Instance Attribute Summary collapse
-
#action_verb ⇒ Object
readonly
Returns the value of attribute action_verb.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #date_string ⇒ Object
- #hash ⇒ Object
-
#initialize(client, action_verb) ⇒ Authentication
constructor
A new instance of Authentication.
Constructor Details
#initialize(client, action_verb) ⇒ Authentication
Returns a new instance of Authentication.
7 8 9 10 |
# File 'lib/teilashare/authentication.rb', line 7 def initialize(client, action_verb) @client = client @action_verb = action_verb end |
Instance Attribute Details
#action_verb ⇒ Object (readonly)
Returns the value of attribute action_verb.
5 6 7 |
# File 'lib/teilashare/authentication.rb', line 5 def action_verb @action_verb end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/teilashare/authentication.rb', line 5 def client @client end |
Instance Method Details
#date_string ⇒ Object
16 17 18 |
# File 'lib/teilashare/authentication.rb', line 16 def date_string date.strftime('%a, %d %b %Y %H:%M:%S GMT') end |
#hash ⇒ Object
12 13 14 |
# File 'lib/teilashare/authentication.rb', line 12 def hash Digest::SHA256.hexdigest(authentication_string).upcase end |