Class: Axn::Webhooks::Signature::Check

Inherits:
Data
  • Object
show all
Defined in:
lib/axn/webhooks/signature.rb

Overview

The outcome of a signature check, with the CAUSE of a rejection named. Deliberately not called Result — Axn::Result already owns that word in this codebase's vocabulary.

reason is one of REASONS (nil when ok). skew is set only for :replay_window, in seconds, signed (positive = the timestamp is in the past). suggested_unit is set only when a pinned unit: is what pushed the timestamp out of the window (see .mismatched_unit, PRO-3142) — nil for a genuine replay, which is what separates the Lob outage (os-app#5128) from a real stale delivery. Under the default unit: AUTO it is nil essentially always.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#okObject (readonly)

Returns the value of attribute ok

Returns:

  • (Object)

    the current value of ok



48
49
50
# File 'lib/axn/webhooks/signature.rb', line 48

def ok
  @ok
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



48
49
50
# File 'lib/axn/webhooks/signature.rb', line 48

def reason
  @reason
end

#skewObject (readonly)

Returns the value of attribute skew

Returns:

  • (Object)

    the current value of skew



48
49
50
# File 'lib/axn/webhooks/signature.rb', line 48

def skew
  @skew
end

#suggested_unitObject (readonly)

Returns the value of attribute suggested_unit

Returns:

  • (Object)

    the current value of suggested_unit



48
49
50
# File 'lib/axn/webhooks/signature.rb', line 48

def suggested_unit
  @suggested_unit
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


49
# File 'lib/axn/webhooks/signature.rb', line 49

def ok? = ok