Sha256: 14047e9de8caaf205feb34f83b378fa3a00b3f7036abfb8233a0d832fb95c572
Contents?: true
Size: 1.36 KB
Versions: 3
Compression:
Stored size: 1.36 KB
Contents
Feature: basic authentication Scenario: basic authentication of a GET request Given following service definition """ class SimpleService < RestfulMapper::Service base_url "http://localhost:8765" default_parameters name: 'test' basic_authentication 'username', 'password' get :simple_endpoint do path "/simple" query_parameters [:name] responses 302 => true end end """ And the service endpoint at port 8765 is running When I call service "SimpleService.simple_endpoint" And the endpoint should receive request header "Authorization" with value "Basic dXNlcm5hbWU6cGFzc3dvcmQ=" Scenario: basic authentication using parameters for username and password Given following service definition """ class SimpleService < RestfulMapper::Service base_url "http://localhost:8765" default_parameters name: 'test' basic_authentication :user, :password get :simple_endpoint do path "/simple" query_parameters [:name] responses 302 => true end end """ And the service endpoint at port 8765 is running When I call service "SimpleService.simple_endpoint user: 'username', password: 'password' " And the endpoint should receive request header "Authorization" with value "Basic dXNlcm5hbWU6cGFzc3dvcmQ="
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
restful_mapper-0.0.3 | features/basic_authentication.feature |
restful_mapper-0.0.2 | features/basic_authentication.feature |
restful_mapper-0.0.1 | features/basic_authentication.feature |