Class: Teilashare::Authentication

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_verbObject (readonly)

Returns the value of attribute action_verb.



5
6
7
# File 'lib/teilashare/authentication.rb', line 5

def action_verb
  @action_verb
end

#clientObject (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_stringObject



16
17
18
# File 'lib/teilashare/authentication.rb', line 16

def date_string
  date.strftime('%a, %d %b %Y %H:%M:%S GMT')
end

#hashObject



12
13
14
# File 'lib/teilashare/authentication.rb', line 12

def hash
  Digest::SHA256.hexdigest(authentication_string).upcase
end