1
class Puppet::Network::HTTP::API::V2::Authorization
2
include Puppet::Network::Authorization
4
def call(request, response)
5
raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError, "Only GET requests are authorized for V2 endpoints" unless request.method == "GET"
8
check_authorization(:find, request.path, request.params)
9
rescue Puppet::Network::AuthorizationError => e
10
raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError, e.message, e.backtrace