mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-27 08:19:22 +03:00
Update auth integration test with --user option.
This commit is contained in:
parent
32a73ce7a4
commit
1292ceaa8c
@ -1,3 +1,3 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl tests_ok/basic_authentication.hurl --user bob@email.com:secret --verbose
|
||||
hurl --user bob@email.com:secret --verbose tests_ok/basic_authentication.hurl
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl tests_ok/basic_authentication.hurl --user bob@email.com:secret --verbose
|
||||
hurl --user bob@email.com:secret --verbose tests_ok/basic_authentication.hurl
|
||||
|
@ -1,3 +1,5 @@
|
||||
curl 'http://bob%40email.com:secret@localhost:8000/basic-authentication-per-request'
|
||||
curl --header 'Authorization: Basic Ym9iQGVtYWlsLmNvbTpzZWNyZXQ=' 'http://localhost:8000/basic-authentication-per-request'
|
||||
curl --header 'Authorization: Basic Ym9iQGVtYWlsLmNvbTpzZWNyZXQ=' 'http://localhost:8000/basic-authentication-per-request'
|
||||
curl --user 'bob@email.com:secret' 'http://localhost:8000/basic-authentication-per-request'
|
||||
curl --user 'bob@email.com:secret' 'http://localhost:8000/basic-authentication-per-request'
|
||||
|
@ -7,13 +7,15 @@ GET http://bob%40email.com:secret@localhost:8000/basic-authentication-per-reques
|
||||
HTTP 200
|
||||
`You are authenticated`
|
||||
|
||||
|
||||
# Header value can be computed with `echo -n 'bob@email.com:secret' | base64`
|
||||
GET http://localhost:8000/basic-authentication-per-request
|
||||
Authorization: Basic Ym9iQGVtYWlsLmNvbTpzZWNyZXQ=
|
||||
HTTP 200
|
||||
`You are authenticated`
|
||||
|
||||
# We can also use a BasicAuth section to specify user and password
|
||||
|
||||
# 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
|
||||
@ -23,3 +25,21 @@ GET http://localhost:8000/basic-authentication-per-request
|
||||
bob@email.com: secret
|
||||
HTTP 200
|
||||
`You are authenticated`
|
||||
|
||||
|
||||
# Finally `--user` option can be used per request
|
||||
GET http://localhost:8000/basic-authentication-per-request
|
||||
[Options]
|
||||
user: bob@email.com:secret
|
||||
HTTP 200
|
||||
`You are authenticated`
|
||||
|
||||
|
||||
# Variables can also be used with `--user`
|
||||
GET http://localhost:8000/basic-authentication-per-request
|
||||
[Options]
|
||||
variable: user=bob@email.com
|
||||
variable: password=secret
|
||||
user: {{user}}:{{password}}
|
||||
HTTP 200
|
||||
`You are authenticated`
|
||||
|
@ -1,3 +1,3 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl tests_ok/basic_authentication_per_request.hurl --verbose
|
||||
hurl --verbose tests_ok/basic_authentication_per_request.hurl
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl tests_ok/basic_authentication_per_request.hurl --verbose
|
||||
hurl --verbose tests_ok/basic_authentication_per_request.hurl
|
||||
|
Loading…
Reference in New Issue
Block a user