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.
16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 |
# File 'lib/models/porcelain.rb', line 16098 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
16086 16087 16088 |
# File 'lib/models/porcelain.rb', line 16086 def allow_repeat @allow_repeat end |
#exclude_characters ⇒ Object
Characters to exclude when generating password
16088 16089 16090 |
# File 'lib/models/porcelain.rb', line 16088 def exclude_characters @exclude_characters end |
#exclude_upper_case ⇒ Object
If set to true do not include upper case letters when generating password
16090 16091 16092 |
# File 'lib/models/porcelain.rb', line 16090 def exclude_upper_case @exclude_upper_case end |
#length ⇒ Object
Password length.
16092 16093 16094 |
# File 'lib/models/porcelain.rb', line 16092 def length @length end |
#num_digits ⇒ Object
Numbers of digits to use when generating password
16094 16095 16096 |
# File 'lib/models/porcelain.rb', line 16094 def num_digits @num_digits end |
#num_symbols ⇒ Object
Number of symbols to use when generating password
16096 16097 16098 |
# File 'lib/models/porcelain.rb', line 16096 def num_symbols @num_symbols end |
Instance Method Details
#to_json(options = {}) ⇒ Object
16114 16115 16116 16117 16118 16119 16120 |
# File 'lib/models/porcelain.rb', line 16114 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 |