Class: Hawk::AuthenticationFailure
- Inherits:
-
Object
- Object
- Hawk::AuthenticationFailure
- Defined in:
- lib/hawk/authentication_failure.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #header ⇒ Object
-
#initialize(key, message, options = {}) ⇒ AuthenticationFailure
constructor
A new instance of AuthenticationFailure.
Constructor Details
#initialize(key, message, options = {}) ⇒ AuthenticationFailure
Returns a new instance of AuthenticationFailure.
4 5 6 |
# File 'lib/hawk/authentication_failure.rb', line 4 def initialize(key, , = {}) @key, , = key, , end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
3 4 5 |
# File 'lib/hawk/authentication_failure.rb', line 3 def key @key end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/hawk/authentication_failure.rb', line 3 def end |
Instance Method Details
#header ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/hawk/authentication_failure.rb', line 8 def header = Time.now.to_i if [:credentials] = Crypto.ts_mac(:ts => , :credentials => [:credentials]).to_s %(Hawk ts="#{timestamp}", tsm="#{timestamp_mac}", error="#{message}") else %(Hawk error="#{message}") end end |