class Inspec::Resources::UserInfo

hand-over system specific behavior to those providers
A user provider implements a system abstracts and helps the InSpec resource
This is an abstract class that every user provoider has to implement.

def collect_user_details

returns the full information list for a user
def collect_user_details
  list_users.map { |username|
    user_details(username.chomp)
  }
end

def credentials(_username)

this method is optional and may not be implemented by each provider
}
warndays: 1,
maxdays: 1,
mindays: 1,
{
returns a hash with meta-data about user credentials
def credentials(_username)
  nil
end

def identity(_username)

}
groups: '',
group: '',
gid: '',
user: '',
uid: '',
{
returns a hash with user-specific values:
def identity(_username)
  fail 'user provider must implement the `identity` method'
end

def initialize(inspec)

def initialize(inspec)
  @inspec = inspec
end

def list_users

returns an array with users
def list_users
  fail 'user provider must implement the `list_users` method'
end

def meta_info(_username)

returns optional information about a user, eg shell
def meta_info(_username)
  nil
end

def user_details(username)

retuns all aspects of the user as one hash
def user_details(username)
  item = {}
  id = identity(username)
  item.merge!(id) unless id.nil?
  meta = meta_info(username)
  item.merge!(meta) unless meta.nil?
  cred = credentials(username)
  item.merge!(cred) unless cred.nil?
  item
end