betahikaru/aws-rest-server

Basic Auth

Closed this issue · 3 comments

We needs any authorization way.
First, we provides basic auth by rack (Rack::Auth::Basic).

参考

      it "return 200 OK" do
        get uri
        expect(last_response).to be_ok
      end
      it "return 200 OK" do
        basic_authorize(ENV['BASIC_AUTH_USERNAME'], ENV['BASIC_AUTH_PASSWORD'])
        get uri
        expect(last_response).to be_ok
      end

参考

curl --user username:password url
curl -u username:password url