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
permalink #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.
13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 |
# File 'lib/models/porcelain.rb', line 13829 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
permalink #allow_repeat ⇒ Object
If set to true allows for consecutive characters to repeat itself
13817 13818 13819 |
# File 'lib/models/porcelain.rb', line 13817 def allow_repeat @allow_repeat end |
permalink #exclude_characters ⇒ Object
Characters to exclude when generating password
13819 13820 13821 |
# File 'lib/models/porcelain.rb', line 13819 def exclude_characters @exclude_characters end |
permalink #exclude_upper_case ⇒ Object
If set to true do not include upper case letters when generating password
13821 13822 13823 |
# File 'lib/models/porcelain.rb', line 13821 def exclude_upper_case @exclude_upper_case end |
permalink #length ⇒ Object
Password length.
13823 13824 13825 |
# File 'lib/models/porcelain.rb', line 13823 def length @length end |
permalink #num_digits ⇒ Object
Numbers of digits to use when generating password
13825 13826 13827 |
# File 'lib/models/porcelain.rb', line 13825 def num_digits @num_digits end |
permalink #num_symbols ⇒ Object
Number of symbols to use when generating password
13827 13828 13829 |
# File 'lib/models/porcelain.rb', line 13827 def num_symbols @num_symbols end |
Instance Method Details
permalink #to_json(options = {}) ⇒ Object
[View source]
13845 13846 13847 13848 13849 13850 13851 |
# File 'lib/models/porcelain.rb', line 13845 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 |