Class: LetsCert::AccountKey

Inherits:
IOPlugin show all
Includes:
FileIOPluginMixin, JWKIOPluginMixin
Defined in:
lib/letscert/io_plugin.rb

Overview

Account key IO plugin

Constant Summary

Constants inherited from IOPlugin

IOPlugin::ALLOWED_PLUGINS

Instance Attribute Summary

Attributes inherited from IOPlugin

#name

Instance Method Summary collapse

Methods included from JWKIOPluginMixin

#dump_jwk, #load_jwk

Methods included from FileIOPluginMixin

#load, #save_to_file

Methods inherited from IOPlugin

empty_data, #initialize, #load, register, registered

Methods included from Loggable

included, #logger

Constructor Details

This class inherits a constructor from LetsCert::IOPlugin

Instance Method Details

#load_from_content(content) ⇒ Hash

Returns:

  • (Hash)


171
172
173
# File 'lib/letscert/io_plugin.rb', line 171

def load_from_content(content)
  { account_key: load_jwk(content) }
end

#persistedHash

Returns always get true for :account_key key.

Returns:

  • (Hash)

    always get true for :account_key key



166
167
168
# File 'lib/letscert/io_plugin.rb', line 166

def persisted
  { account_key: true }
end

#save(data) ⇒ void

This method returns an undefined value.

Save account key.

Parameters:

  • data (Hash)


178
179
180
# File 'lib/letscert/io_plugin.rb', line 178

def save(data)
  save_to_file(dump_jwk(data[:account_key]))
end