Sha256: 69c041db689902c3fee4f308f333790665739816fa89d4e770e562a9ba97748f
Contents?: true
Size: 613 Bytes
Versions: 58
Compression:
Stored size: 613 Bytes
Contents
class Puppet::Network::HTTP::API::V2::Authorization include Puppet::Network::Authorization def call(request, response) if request.method != "GET" raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError.new("Only GET requests are authorized for V2 endpoints", Puppet::Network::HTTP::Issues::UNSUPPORTED_METHOD) end begin check_authorization(:find, request.path, request.params) rescue Puppet::Network::AuthorizationError => e raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError.new(e.message, Puppet::Network::HTTP::Issues::FAILED_AUTHORIZATION) end end end
Version data entries
58 entries across 58 versions & 2 rubygems