Set fieldlabel default to Password
This commit is contained in:
@@ -116,9 +116,9 @@ module Zanzibar
|
||||
## Retrieve the value from a field label of a secret
|
||||
# Will raise an error if there are any issues
|
||||
# @param [Integer] the secret id
|
||||
# @param [String] the field label to get
|
||||
# @param [String] the field label to get, defaults to Password
|
||||
# @return [String] the value for the given field label
|
||||
def get_fieldlabel_value(scrt_id, fieldlabel)
|
||||
def get_fieldlabel_value(scrt_id, fieldlabel = 'Password')
|
||||
secret = get_secret(scrt_id)
|
||||
secret_items = secret[:secret][:items][:secret_item]
|
||||
return get_secret_item_by_field_name(secret_items, fieldlabel)[:value]
|
||||
@@ -132,7 +132,7 @@ module Zanzibar
|
||||
# @return [String] the password for the given secret
|
||||
|
||||
def get_password(scrt_id)
|
||||
return get_fieldlabel_value(scrt_id, 'Password')
|
||||
return get_fieldlabel_value(scrt_id)
|
||||
end
|
||||
|
||||
## Get the password, save it to a file, and return the path to the file.
|
||||
|
||||
Reference in New Issue
Block a user