blob: ff3d1493d67277b33680ae32782d7e8d270bbce2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
require_relative "endpoint"
Artifice.deactivate
class EndpointBasicAuthentication < Endpoint
before do
unless env["HTTP_AUTHORIZATION"]
halt 401, "Authentication info not supplied"
end
end
end
Artifice.activate_with(EndpointBasicAuthentication)
|