Class: Clickwrap::Integrity::Timestamp::Verification

Inherits:
Data
  • Object
show all
Defined in:
lib/clickwrap/integrity/timestamp.rb

Overview

The result of checking a token. status carries the provider's own validation vocabulary unchanged, because "valid according to this authority today" is a narrower and more useful statement than "valid".

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(checked: false, verified: false, status: nil, provider_name: nil, protocol: nil, detail: nil) ⇒ Verification

Returns a new instance of Verification.



72
73
74
75
# File 'lib/clickwrap/integrity/timestamp.rb', line 72

def initialize(checked: false, verified: false, status: nil, provider_name: nil,
               protocol: nil, detail: nil)
  super
end

Instance Attribute Details

#checkedObject (readonly)

Returns the value of attribute checked

Returns:

  • (Object)

    the current value of checked



71
72
73
# File 'lib/clickwrap/integrity/timestamp.rb', line 71

def checked
  @checked
end

#detailObject (readonly)

Returns the value of attribute detail

Returns:

  • (Object)

    the current value of detail



71
72
73
# File 'lib/clickwrap/integrity/timestamp.rb', line 71

def detail
  @detail
end

#protocolObject (readonly)

Returns the value of attribute protocol

Returns:

  • (Object)

    the current value of protocol



71
72
73
# File 'lib/clickwrap/integrity/timestamp.rb', line 71

def protocol
  @protocol
end

#provider_nameObject (readonly)

Returns the value of attribute provider_name

Returns:

  • (Object)

    the current value of provider_name



71
72
73
# File 'lib/clickwrap/integrity/timestamp.rb', line 71

def provider_name
  @provider_name
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



71
72
73
# File 'lib/clickwrap/integrity/timestamp.rb', line 71

def status
  @status
end

#verifiedObject (readonly)

Returns the value of attribute verified

Returns:

  • (Object)

    the current value of verified



71
72
73
# File 'lib/clickwrap/integrity/timestamp.rb', line 71

def verified
  @verified
end

Instance Method Details

#to_hObject



77
78
79
80
81
82
83
84
85
86
# File 'lib/clickwrap/integrity/timestamp.rb', line 77

def to_h
  {
    "checked" => checked,
    "verified" => verified,
    "provider_reported_status" => status,
    "provider_name" => provider_name,
    "protocol" => protocol,
    "detail" => detail
  }.compact
end