Method: Inspec::Resources::WindowsUser#credentials

Defined in:
lib/inspec/resources/users.rb

#credentials(username) ⇒ Object



635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/inspec/resources/users.rb', line 635

def credentials(username)
  res = identity(username)
  return if res.nil?
  {
    mindays: res[:mindays],
    maxdays: res[:maxdays],
    warndays: res[:warndays],
    badpasswordattempts: res[:badpasswordattempts],
    maxbadpasswords: res[:maxbadpasswords],
    minpasswordlength: res[:minpasswordlength],
    passwordage: res[:passwordage],
  }
end