Class: SDM::ManagedSecretPasswordPolicy
- Inherits:
-
Object
- Object
- SDM::ManagedSecretPasswordPolicy
- 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) ⇒ ManagedSecretPasswordPolicy
constructor
A new instance of ManagedSecretPasswordPolicy.
- #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) ⇒ ManagedSecretPasswordPolicy
Returns a new instance of ManagedSecretPasswordPolicy.
8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 |
# File 'lib/models/porcelain.rb', line 8703 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
8691 8692 8693 |
# File 'lib/models/porcelain.rb', line 8691 def allow_repeat @allow_repeat end |
#exclude_characters ⇒ Object
Characters to exclude when generating password
8693 8694 8695 |
# File 'lib/models/porcelain.rb', line 8693 def exclude_characters @exclude_characters end |
#exclude_upper_case ⇒ Object
If set to true do not include upper case letters when generating password
8695 8696 8697 |
# File 'lib/models/porcelain.rb', line 8695 def exclude_upper_case @exclude_upper_case end |
#length ⇒ Object
Password length
8697 8698 8699 |
# File 'lib/models/porcelain.rb', line 8697 def length @length end |
#num_digits ⇒ Object
Numbers of digits to use when generating password
8699 8700 8701 |
# File 'lib/models/porcelain.rb', line 8699 def num_digits @num_digits end |
#num_symbols ⇒ Object
Number of symbols to use when generating password
8701 8702 8703 |
# File 'lib/models/porcelain.rb', line 8701 def num_symbols @num_symbols end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8719 8720 8721 8722 8723 8724 8725 |
# File 'lib/models/porcelain.rb', line 8719 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 |