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