Class: RubyAem::Resources::AuthorizableKeystore
- Inherits:
-
Object
- Object
- RubyAem::Resources::AuthorizableKeystore
- Defined in:
- lib/ruby_aem/resources/authorizable_keystore.rb
Overview
AEM class contains API calls related to managing the AEM Authorizable Keystore.
Instance Method Summary collapse
-
#change_password(old_password, new_password) ⇒ Object
RubyAem::Result.
-
#create(password) ⇒ Object
Create AEM Authorizable Keystore.
-
#delete ⇒ Object
Delete AEM Authorizable Keystore.
-
#download(file_path) ⇒ Object
Download the AEM Keystore to a specified directory.
-
#exists ⇒ Object
Check if a keystore for the given authorizable id already exists.
-
#info ⇒ Object
Retrieve AEM Authorizable Keystore info.
-
#initialize(client, intermediate_path, authorizable_id) ⇒ Object
constructor
Initialise an Authorizable Keystore.
-
#read(file_path, password) ⇒ Object
Read an authorizable keystore in PKCS#12 Format.
Constructor Details
#initialize(client, intermediate_path, authorizable_id) ⇒ Object
Initialise an Authorizable Keystore
30 31 32 33 34 35 36 |
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 30 def initialize(client, intermediate_path, ) @client = client @call_params = { intermediate_path: intermediate_path, authorizable_id: } end |
Instance Method Details
#change_password(old_password, new_password) ⇒ Object
Returns RubyAem::Result.
53 54 55 56 57 |
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 53 def change_password(old_password, new_password) @call_params[:old_password] = old_password @call_params[:new_password] = new_password @client.call(self.class, __callee__.to_s, @call_params) end |
#create(password) ⇒ Object
Create AEM Authorizable Keystore.
42 43 44 45 |
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 42 def create(password) @call_params[:password] = password @client.call(self.class, __callee__.to_s, @call_params) end |
#delete ⇒ Object
Delete AEM Authorizable Keystore
83 84 85 |
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 83 def delete @client.call(self.class, __callee__.to_s, @call_params) end |
#download(file_path) ⇒ Object
Download the AEM Keystore to a specified directory.
73 74 75 76 77 78 |
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 73 def download( file_path ) @call_params[:file_path] = file_path @client.call(self.class, __callee__.to_s, @call_params) end |
#exists ⇒ Object
Check if a keystore for the given authorizable id already exists.
90 91 92 |
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 90 def exists @client.call(self.class, __callee__.to_s, @call_params) end |
#info ⇒ Object
Retrieve AEM Authorizable Keystore info.
97 98 99 |
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 97 def info @client.call(self.class, __callee__.to_s, @call_params) end |
#read(file_path, password) ⇒ Object
Read an authorizable keystore in PKCS#12 Format
64 65 66 67 |
# File 'lib/ruby_aem/resources/authorizable_keystore.rb', line 64 def read(file_path, password) = File.read file_path OpenSSL::PKCS12.new(, password) end |