Sha256: e52b5b0544c1a5c5f172772209c477fbe378aa1f5c898d3599190f369523b4ca

Contents?: true

Size: 700 Bytes

Versions: 43

Compression:

Stored size: 700 Bytes

Contents

module ONCCertificationG10TestKit
  class UnauthorizedAccessTest < Inferno::Test
    title 'Server rejects unauthorized access'
    description %(
      A server SHALL reject any unauthorized requests by returning an HTTP 401
      unauthorized response code.
    )
    id :g10_unauthorized_access
    input :patient_id, :url
    uses_request :token

    fhir_client :unauthenticated do
      url :url
    end

    run do
      skip_if request.status != 200, 'Token exchange was unsuccessful'
      skip_if patient_id.blank?, 'Patient context expected to verify unauthorized read.'

      fhir_read(:patient, patient_id, client: :unauthenticated)

      assert_response_status(401)
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
onc_certification_g10_test_kit-7.0.3 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-7.0.2 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-7.0.1 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-7.0.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-6.0.3 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-6.0.2 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-6.0.1 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-6.0.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-5.4.2 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-5.4.1 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-5.3.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-5.2.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-5.1.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-5.0.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-4.1.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-4.0.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-3.8.1 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-3.8.0 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-3.7.2 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb
onc_certification_g10_test_kit-3.7.1 lib/onc_certification_g10_test_kit/unauthorized_access_test.rb