Class: AtprotoAuth::DPoP::NonceManager::StoredNonce

Inherits:
Object
  • Object
show all
Defined in:
lib/atproto_auth/dpop/nonce_manager.rb

Overview

Represents a stored nonce with its server URL

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, server_url, timestamp: nil) ⇒ StoredNonce

Returns a new instance of StoredNonce.



16
17
18
19
20
# File 'lib/atproto_auth/dpop/nonce_manager.rb', line 16

def initialize(value, server_url, timestamp: nil)
  @value = value
  @server_url = server_url
  @timestamp = timestamp || Time.now.to_i
end

Instance Attribute Details

#server_urlObject (readonly)

Returns the value of attribute server_url.



14
15
16
# File 'lib/atproto_auth/dpop/nonce_manager.rb', line 14

def server_url
  @server_url
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



14
15
16
# File 'lib/atproto_auth/dpop/nonce_manager.rb', line 14

def timestamp
  @timestamp
end

#valueObject (readonly)

Returns the value of attribute value.



14
15
16
# File 'lib/atproto_auth/dpop/nonce_manager.rb', line 14

def value
  @value
end