Class: CachedMLEKId

Inherits:
Object
  • Object
show all
Defined in:
lib/AuthenticationSDK/util/CachedMLEKId.rb

Overview

Cache value object to store MLE KID data

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kid = nil, last_modified_timestamp = nil) ⇒ CachedMLEKId

Returns a new instance of CachedMLEKId.



5
6
7
8
# File 'lib/AuthenticationSDK/util/CachedMLEKId.rb', line 5

def initialize(kid = nil, last_modified_timestamp = nil)
  @kid = kid
  @last_modified_timestamp = last_modified_timestamp
end

Instance Attribute Details

#kidObject

Returns the value of attribute kid.



3
4
5
# File 'lib/AuthenticationSDK/util/CachedMLEKId.rb', line 3

def kid
  @kid
end

#last_modified_timestampObject

Returns the value of attribute last_modified_timestamp.



3
4
5
# File 'lib/AuthenticationSDK/util/CachedMLEKId.rb', line 3

def last_modified_timestamp
  @last_modified_timestamp
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/AuthenticationSDK/util/CachedMLEKId.rb', line 14

def empty?
  @kid.nil? && @last_modified_timestamp.nil?
end

#to_sObject



10
11
12
# File 'lib/AuthenticationSDK/util/CachedMLEKId.rb', line 10

def to_s
  "CachedMLEKId(kid: #{@kid ? 'present' : 'nil'}, last_modified_timestamp: #{@last_modified_timestamp})"
end