Sha256: 0b0d9d145f3b7ddb1045992a63f239c349cd84ef09ad49db11cbf76f309e555b

Contents?: true

Size: 823 Bytes

Versions: 474

Compression:

Stored size: 823 Bytes

Contents

module Puppet::Network # :nodoc:
  # A struct-like class for passing around a client request.  It's mostly
  # just used for validation and authorization.
  class ClientRequest
    attr_accessor :name, :ip, :authenticated, :handler, :method

    def authenticated?
      self.authenticated
    end

    # A common way of talking about the full call.  Individual servers
    # are responsible for setting the values correctly, but this common
    # format makes it possible to check rights.
    def call
      raise ArgumentError, _("Request is not set up; cannot build call") unless handler and method

      [handler, method].join(".")
    end

    def initialize(name, ip, authenticated)
      @name, @ip, @authenticated = name, ip, authenticated
    end

    def to_s
      "#{self.name}(#{self.ip})"
    end
  end
end

Version data entries

474 entries across 474 versions & 2 rubygems

Version Path
puppet-7.17.0 lib/puppet/network/client_request.rb
puppet-7.17.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-7.17.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-7.17.0-universal-darwin lib/puppet/network/client_request.rb
puppet-6.27.0 lib/puppet/network/client_request.rb
puppet-6.27.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-6.27.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-6.27.0-universal-darwin lib/puppet/network/client_request.rb
puppet-7.16.0 lib/puppet/network/client_request.rb
puppet-7.16.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-7.16.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-7.16.0-universal-darwin lib/puppet/network/client_request.rb
puppet-7.15.0 lib/puppet/network/client_request.rb
puppet-7.15.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-7.15.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-7.15.0-universal-darwin lib/puppet/network/client_request.rb
puppet-6.26.0 lib/puppet/network/client_request.rb
puppet-6.26.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-6.26.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-6.26.0-universal-darwin lib/puppet/network/client_request.rb