hurl/integration/tests_ok/basic_authentication_per_request.hurl

26 lines
820 B
Plaintext
Raw Normal View History

# Authentication with:
# username=bob@email.com
# password=secret
# the '@' must be url-escaped
GET http://bob%40email.com:secret@localhost:8000/basic-authentication-per-request
2022-11-11 16:25:00 +03:00
HTTP 200
2022-12-02 22:50:27 +03:00
`You are authenticated`
2021-12-16 23:52:14 +03:00
# Header value can be computed with `echo -n 'bob@email.com:secret' | base64`
2021-12-16 23:52:14 +03:00
GET http://localhost:8000/basic-authentication-per-request
Authorization: Basic Ym9iQGVtYWlsLmNvbTpzZWNyZXQ=
2022-11-11 16:25:00 +03:00
HTTP 200
2022-12-02 22:50:27 +03:00
`You are authenticated`
2021-12-16 23:52:14 +03:00
# We can also use a BasicAuth section to specify user and password
# without any base64 encoding.
# Note that spaces surrounded user and password are trimmed. If you
# really want a space in your password (!!), you could use Hurl
# unicode literal \u{20}.
2021-12-16 23:52:14 +03:00
GET http://localhost:8000/basic-authentication-per-request
[BasicAuth]
bob@email.com: secret
2022-11-11 16:25:00 +03:00
HTTP 200
2022-12-02 22:50:27 +03:00
`You are authenticated`