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

Version Path
puppet-retrospec-0.12.2 vendor/gems/puppet-3.7.3/lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.7 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.7-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.7-x64-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.6 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.6-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-retrospec-0.12.1 vendor/gems/puppet-3.7.3/lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.6-x64-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-retrospec-0.12.0 vendor/gems/puppet-3.7.3/lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.5 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.5-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.5-x64-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.4 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.4-x86-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-3.8.4-x64-mingw32 lib/puppet/network/http/api/v2/authorization.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/network/http/api/v2/authorization.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/network/http/api/v2/authorization.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/network/http/api/v2/authorization.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/network/http/api/v2/authorization.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/network/http/api/v2/authorization.rb