Class: Rottweiler::Auth::Result
- Inherits:
-
Object
- Object
- Rottweiler::Auth::Result
- Defined in:
- lib/rottweiler/auth/result.rb
Overview
Implements the logic for JWT token parsing
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(request) ⇒ Result
constructor
A new instance of Result.
- #valid? ⇒ Boolean
Constructor Details
#initialize(request) ⇒ Result
Returns a new instance of Result.
11 12 13 14 15 16 17 18 |
# File 'lib/rottweiler/auth/result.rb', line 11 def initialize(request) @request = request @data = nil @errors = [] check_decode_key! verify! if errors.empty? end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/rottweiler/auth/result.rb', line 9 def data @data end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
9 10 11 |
# File 'lib/rottweiler/auth/result.rb', line 9 def errors @errors end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
9 10 11 |
# File 'lib/rottweiler/auth/result.rb', line 9 def request @request end |
Instance Method Details
#valid? ⇒ Boolean
20 21 22 |
# File 'lib/rottweiler/auth/result.rb', line 20 def valid? @errors.empty? end |