257 lines
9.3 KiB
YAML
257 lines
9.3 KiB
YAML
info:
|
|
name: Login once
|
|
type: http
|
|
seq: 3
|
|
|
|
http:
|
|
method: POST
|
|
url: "{{elixFormsApiUrl}}/authentication/login/v1"
|
|
headers:
|
|
- name: x-requested-with
|
|
value: XMLHttpRequest
|
|
body:
|
|
type: json
|
|
data: |-
|
|
{
|
|
"username": "{{elixFormsApiUsername}}",
|
|
"password": "{{elixFormsApiPassword}}"
|
|
}
|
|
|
|
runtime:
|
|
scripts:
|
|
- type: after-response
|
|
code: |-
|
|
test("Status code is 200", function () {
|
|
expect(res.getStatus()).to.equal(200);
|
|
var jsonData = res.getBody();
|
|
bru.setVar("elixFormsApiAuthToken", jsonData.value.authToken);
|
|
});
|
|
|
|
settings:
|
|
encodeUrl: true
|
|
timeout: 0
|
|
followRedirects: true
|
|
maxRedirects: 5
|
|
forwardAuthorizationHeader: true
|
|
|
|
examples:
|
|
- name: Login - Success
|
|
request:
|
|
url: "{{elixFormsApiUrl}}/authentication/login/v1"
|
|
method: POST
|
|
body:
|
|
type: form-urlencoded
|
|
data:
|
|
- name: username
|
|
value: "{{elixFormsApiUsername}}"
|
|
- name: password
|
|
value: "{{elixFormsApiPassword}}"
|
|
response:
|
|
statusText: "200"
|
|
headers:
|
|
- name: cache-control
|
|
value: no-cache, no-store, must-revalidate
|
|
- name: pragma
|
|
value: no-cache
|
|
- name: proxy-connection
|
|
value: Keep-Alive
|
|
- name: x-content-security-policy
|
|
value: default-src 'self'; connect-src 'self'; font-src 'none'; img-src 'self'; media-src 'self'; object-src 'self'; plugin-types application/pdf audio/x-wav; referrer no-referrer; reflected-xss block; script-src 'self'; style-src 'self'
|
|
- name: content-type
|
|
value: application/json;charset=UTF-8
|
|
- name: strict-transport-security
|
|
value: max-age=63072000;includeSubDomains
|
|
- name: content-security-policy
|
|
value: "default-src https: data: 'unsafe-inline' 'unsafe-eval'"
|
|
- name: x-frame-options
|
|
value: SAMEORIGIN
|
|
- name: x-xss-protection
|
|
value: 1;mode=block
|
|
- name: x-content-type-options
|
|
value: nosniff
|
|
- name: referrer-policy
|
|
value: unsafe-url
|
|
- name: transfer-encoding
|
|
value: chunked
|
|
- name: vary
|
|
value: Accept-Encoding
|
|
- name: content-encoding
|
|
value: gzip
|
|
body:
|
|
type: json
|
|
data: |-
|
|
{
|
|
"value": {
|
|
"code": "OK",
|
|
"description": "OK",
|
|
"complete": true,
|
|
"globalStatus": "OK",
|
|
"resultNumber": 1,
|
|
"serviceInformationList": {
|
|
"serviceInformation": [
|
|
{
|
|
"ITSystemName": "EF-CORE",
|
|
"complete": true,
|
|
"serviceVersion": "1.1.0",
|
|
"statusDetailList": {
|
|
"statusDetail": [
|
|
{
|
|
"code": "OK",
|
|
"description": "OK",
|
|
"detailStatus": "OK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"uuid": "9d0ba2e7-8e98-4a7a-9fa1-67d421d0aa1e",
|
|
"version": "3.0.0",
|
|
"matchingEntitiesSize": 1,
|
|
"authToken": "2coDKQPTPJAQxWLSNRItM="
|
|
}
|
|
}
|
|
- name: Login - Failure
|
|
request:
|
|
url: "{{elixFormsApiUrl}}/authentication/login/v1"
|
|
method: POST
|
|
body:
|
|
type: form-urlencoded
|
|
data:
|
|
- name: username
|
|
value: "{{elixFormsApiUsername}}"
|
|
- name: password
|
|
value: "{{elixFormsApiPassword}}x"
|
|
response:
|
|
statusText: "401"
|
|
headers:
|
|
- name: cache-control
|
|
value: no-cache, no-store, must-revalidate
|
|
- name: pragma
|
|
value: no-cache
|
|
- name: proxy-connection
|
|
value: Keep-Alive
|
|
- name: x-content-security-policy
|
|
value: default-src 'self'; connect-src 'self'; font-src 'none'; img-src 'self'; media-src 'self'; object-src 'self'; plugin-types application/pdf audio/x-wav; referrer no-referrer; reflected-xss block; script-src 'self'; style-src 'self'
|
|
- name: content-language
|
|
value: ""
|
|
- name: content-type
|
|
value: text/html;charset=UTF-8
|
|
- name: content-length
|
|
value: "1074"
|
|
- name: strict-transport-security
|
|
value: max-age=63072000;includeSubDomains
|
|
- name: content-security-policy
|
|
value: "default-src https: data: 'unsafe-inline' 'unsafe-eval'"
|
|
- name: x-frame-options
|
|
value: SAMEORIGIN
|
|
- name: x-xss-protection
|
|
value: 1;mode=block
|
|
- name: x-content-type-options
|
|
value: nosniff
|
|
- name: referrer-policy
|
|
value: unsafe-url
|
|
body:
|
|
type: html
|
|
data: |-
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Payara Server 6.2025.1 #badassfish - Error report</title>
|
|
<style type="text/css">
|
|
<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}-->
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>HTTP Status 401 - Unauthorized</h1>
|
|
<hr/>
|
|
<p>
|
|
<b>type</b> Status report
|
|
</p>
|
|
<p>
|
|
<b>message</b>Unauthorized
|
|
</p>
|
|
<p>
|
|
<b>description</b>This request requires HTTP authentication.
|
|
</p>
|
|
<hr/>
|
|
<h3>Payara Server 6.2025.1 #badassfish</h3>
|
|
</body>
|
|
</html>
|
|
- name: Login
|
|
request:
|
|
url: "{{elixFormsApiUrl}}/authentication/login/v1"
|
|
method: POST
|
|
body:
|
|
type: form-urlencoded
|
|
data:
|
|
- name: username
|
|
value: "{{elixFormsApiUsername}}"
|
|
- name: password
|
|
value: "{{elixFormsApiPassword}}"
|
|
response:
|
|
statusText: "200"
|
|
headers:
|
|
- name: cache-control
|
|
value: no-cache, no-store, must-revalidate
|
|
- name: pragma
|
|
value: no-cache
|
|
- name: proxy-connection
|
|
value: Keep-Alive
|
|
- name: x-content-security-policy
|
|
value: default-src 'self'; connect-src 'self'; font-src 'none'; img-src 'self'; media-src 'self'; object-src 'self'; plugin-types application/pdf audio/x-wav; referrer no-referrer; reflected-xss block; script-src 'self'; style-src 'self'
|
|
- name: content-type
|
|
value: application/json;charset=UTF-8
|
|
- name: strict-transport-security
|
|
value: max-age=63072000;includeSubDomains
|
|
- name: content-security-policy
|
|
value: "default-src https: data: 'unsafe-inline' 'unsafe-eval'"
|
|
- name: x-frame-options
|
|
value: SAMEORIGIN
|
|
- name: x-xss-protection
|
|
value: 1;mode=block
|
|
- name: x-content-type-options
|
|
value: nosniff
|
|
- name: referrer-policy
|
|
value: unsafe-url
|
|
- name: transfer-encoding
|
|
value: chunked
|
|
- name: vary
|
|
value: Accept-Encoding
|
|
- name: content-encoding
|
|
value: gzip
|
|
body:
|
|
type: json
|
|
data: |-
|
|
{
|
|
"value": {
|
|
"code": "OK",
|
|
"description": "OK",
|
|
"complete": true,
|
|
"globalStatus": "OK",
|
|
"resultNumber": 1,
|
|
"serviceInformationList": {
|
|
"serviceInformation": [
|
|
{
|
|
"ITSystemName": "EF-CORE",
|
|
"complete": true,
|
|
"serviceVersion": "1.2.0",
|
|
"statusDetailList": {
|
|
"statusDetail": [
|
|
{
|
|
"code": "OK",
|
|
"description": "OK",
|
|
"detailStatus": "OK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"uuid": "31ee57d5-01b9-4fce-94e2-a224282c08ec",
|
|
"version": "3.0.0",
|
|
"matchingEntitiesSize": 1,
|
|
"authToken": "Z8uKwrp86iSWykuRlRM1k="
|
|
}
|
|
}
|