Sha256: a280f7cbf7497fc445e4499c13098adcf9288099ea95e8b75f7265d12b6f6c98

Contents?: true

Size: 504 Bytes

Versions: 10

Compression:

Stored size: 504 Bytes

Contents

class Puppet::Network::HTTP::API::V2::Authorization
  include Puppet::Network::Authorization

  def call(request, response)
    raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError, "Only GET requests are authorized for V2 endpoints" unless request.method == "GET"

    begin
      check_authorization(:find, request.path, request.params)
    rescue Puppet::Network::AuthorizationError => e
      raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError, e.message, e.backtrace
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
puppet-3.5.1 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.1-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.1.rc1 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.1.rc1-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.0.rc3 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.0.rc3-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.0.rc2 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.0.rc2-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.0.rc1 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.5.0.rc1-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb