Class: SDM::SecretEnginePasswordPolicy
- Inherits:
-
Object
- Object
- SDM::SecretEnginePasswordPolicy
- Defined in:
- lib/models/porcelain.rb
Instance Attribute Summary collapse
-
#allow_repeat ⇒ Object
If set to true allows for consecutive characters to repeat itself.
-
#exclude_characters ⇒ Object
Characters to exclude when generating password.
-
#exclude_upper_case ⇒ Object
If set to true do not include upper case letters when generating password.
-
#length ⇒ Object
Password length.
-
#num_digits ⇒ Object
Numbers of digits to use when generating password.
-
#num_symbols ⇒ Object
Number of symbols to use when generating password.
Instance Method Summary collapse
-
#initialize(allow_repeat: nil, exclude_characters: nil, exclude_upper_case: nil, length: nil, num_digits: nil, num_symbols: nil) ⇒ SecretEnginePasswordPolicy
constructor
A new instance of SecretEnginePasswordPolicy.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(allow_repeat: nil, exclude_characters: nil, exclude_upper_case: nil, length: nil, num_digits: nil, num_symbols: nil) ⇒ SecretEnginePasswordPolicy
Returns a new instance of SecretEnginePasswordPolicy.
13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 |
# File 'lib/models/porcelain.rb', line 13917 def initialize( allow_repeat: nil, exclude_characters: nil, exclude_upper_case: nil, length: nil, num_digits: nil, num_symbols: nil ) @allow_repeat = allow_repeat == nil ? false : allow_repeat @exclude_characters = exclude_characters == nil ? "" : exclude_characters @exclude_upper_case = exclude_upper_case == nil ? false : exclude_upper_case @length = length == nil ? 0 : length @num_digits = num_digits == nil ? 0 : num_digits @num_symbols = num_symbols == nil ? 0 : num_symbols end |
Instance Attribute Details
#allow_repeat ⇒ Object
If set to true allows for consecutive characters to repeat itself
13905 13906 13907 |
# File 'lib/models/porcelain.rb', line 13905 def allow_repeat @allow_repeat end |
#exclude_characters ⇒ Object
Characters to exclude when generating password
13907 13908 13909 |
# File 'lib/models/porcelain.rb', line 13907 def exclude_characters @exclude_characters end |
#exclude_upper_case ⇒ Object
If set to true do not include upper case letters when generating password
13909 13910 13911 |
# File 'lib/models/porcelain.rb', line 13909 def exclude_upper_case @exclude_upper_case end |
#length ⇒ Object
Password length.
13911 13912 13913 |
# File 'lib/models/porcelain.rb', line 13911 def length @length end |
#num_digits ⇒ Object
Numbers of digits to use when generating password
13913 13914 13915 |
# File 'lib/models/porcelain.rb', line 13913 def num_digits @num_digits end |
#num_symbols ⇒ Object
Number of symbols to use when generating password
13915 13916 13917 |
# File 'lib/models/porcelain.rb', line 13915 def num_symbols @num_symbols end |
Instance Method Details
#to_json(options = {}) ⇒ Object
13933 13934 13935 13936 13937 13938 13939 |
# File 'lib/models/porcelain.rb', line 13933 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |