Exception: ApiAuthenticator::InvalidTokenError
- Defined in:
- lib/api_authenticator/errors.rb
Instance Attribute Summary collapse
-
#keys_and_tokens ⇒ Object
readonly
Returns the value of attribute keys_and_tokens.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #constructed_message ⇒ Object
-
#initialize(time, keys_and_tokens) ⇒ InvalidTokenError
constructor
A new instance of InvalidTokenError.
Constructor Details
#initialize(time, keys_and_tokens) ⇒ InvalidTokenError
Returns a new instance of InvalidTokenError.
22 23 24 25 |
# File 'lib/api_authenticator/errors.rb', line 22 def initialize(time, keys_and_tokens) @time = time @keys_and_tokens = keys_and_tokens end |
Instance Attribute Details
#keys_and_tokens ⇒ Object (readonly)
Returns the value of attribute keys_and_tokens.
20 21 22 |
# File 'lib/api_authenticator/errors.rb', line 20 def keys_and_tokens @keys_and_tokens end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
20 21 22 |
# File 'lib/api_authenticator/errors.rb', line 20 def time @time end |
Instance Method Details
#constructed_message ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/api_authenticator/errors.rb', line 28 def = "" @keys_and_tokens.each do |key_and_token| << "Invalid Token Error Time: #{@time} Shared Key: #{key_and_token[0]} expected token: #{key_and_token[2]} actual token: #{key_and_token[1]}" end end |