def check_pw(user, pw)
      raise JSS::InvalidDataError, "The first parameter must be one of :ro, :rw, :ssh, :http" unless [:ro, :rw, :ssh, :http].include? user
      sha256 = case user
        when :rw then @read_write_password_sha256
        when :ro then @read_only_password_sha256
        when :http then @http_password_sha256
        when :ssh then @ssh_password_sha256
      end # case

      return nil if sha256 == EMPTY_PW_256

      sha256 == Digest::SHA2.new(256).update(pw).to_s
    end
def check_pw(user, pw)
      raise JSS::InvalidDataError, "The first parameter must be one of :ro, :rw, :ssh, :http" unless [:ro, :rw, :ssh, :http].include? user
      sha256 = case user
        when :rw then @read_write_password_sha256
        when :ro then @read_only_password_sha256
        when :http then @http_password_sha256
        when :ssh then @ssh_password_sha256
      end # case

      return nil if sha256 == EMPTY_PW_256

      sha256 == Digest::SHA2.new(256).update(pw).to_s
    end
As well as the standard :id, :name, and :data, you can
 instantiate this class with :id => :master, in which case you'll
 get the Master Distribution Point as defined in the JSS.
 An error will be raised if one hasn't been defined.

 You can also do this more easily by calling JSS.master_distribution_point

init

 Check the validity of a password.

 @param user[Symbol] one of :ro, :rw, :ssh, :http

 @param pw[String] the password to check for the given user

 @return [Boolean,Nil] was the password correct?
   nil is returned if there is no password set in the JSS.