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.25.0 lib/puppet/network/client_request.rb
puppet-7.25.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-7.25.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-7.25.0-universal-darwin lib/puppet/network/client_request.rb
puppet-7.24.0 lib/puppet/network/client_request.rb
puppet-7.24.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-7.24.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-7.24.0-universal-darwin lib/puppet/network/client_request.rb
puppet-7.23.0 lib/puppet/network/client_request.rb
puppet-7.23.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-7.23.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-7.23.0-universal-darwin lib/puppet/network/client_request.rb
puppet-7.22.0 lib/puppet/network/client_request.rb
puppet-7.22.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-7.22.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-7.22.0-universal-darwin lib/puppet/network/client_request.rb
puppet-6.29.0 lib/puppet/network/client_request.rb
puppet-6.29.0-x86-mingw32 lib/puppet/network/client_request.rb
puppet-6.29.0-x64-mingw32 lib/puppet/network/client_request.rb
puppet-6.29.0-universal-darwin lib/puppet/network/client_request.rb