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, #logger, logger=, register, registered

Constructor Details

This class inherits a constructor from LetsCert::IOPlugin

Instance Method Details

#load_from_content(content) ⇒ Object



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

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

#persistedObject



173
174
175
# File 'lib/letscert/io_plugin.rb', line 173

def persisted
  { account_key: true }
end

#save(data) ⇒ Object



181
182
183
# File 'lib/letscert/io_plugin.rb', line 181

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