diff options
Diffstat (limited to 'lib/leap_cli/config/object.rb')
-rw-r--r-- | lib/leap_cli/config/object.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/leap_cli/config/object.rb b/lib/leap_cli/config/object.rb index 8b14c49..ad32f54 100644 --- a/lib/leap_cli/config/object.rb +++ b/lib/leap_cli/config/object.rb @@ -39,6 +39,10 @@ module LeapCli self.ya2yaml(:syck_compatible => true) end + def dump_json + generate_json(self) + end + ## ## FETCHING VALUES ## @@ -169,6 +173,15 @@ module LeapCli end end + # + # inserts a named secret, generating it if needed. + # + # manager.export_secrets should be called later to capture any newly generated secrets. + # + def secret(name, length=32) + @manager.secrets[name.to_s] ||= Util::Secret.generate(length) + end + private # |