Exception: Phlex::Reactive::InvalidToken

Inherits:
Error
  • Object
show all
Defined in:
lib/phlex/reactive.rb

Overview

Raised when a signed identity token fails verification (tampered, expired, or signed with a different key) — or when a verified token names a class that doesn't resolve to a reactive component. diagnostic classifies the cause (:tampered, :unknown_class, :not_reactive_class) so the endpoint can render a verbose_errors body explaining WHICH failure this was.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, diagnostic: nil) ⇒ InvalidToken

Returns a new instance of InvalidToken.



39
40
41
42
# File 'lib/phlex/reactive.rb', line 39

def initialize(msg = nil, diagnostic: nil)
  @diagnostic = diagnostic
  super(msg)
end

Instance Attribute Details

#diagnosticObject (readonly)

Returns the value of attribute diagnostic.



37
38
39
# File 'lib/phlex/reactive.rb', line 37

def diagnostic
  @diagnostic
end