By default the verification will not run if the environment name is set to local. To test,
change the setting MATH_DOJO_ENV_NAME in src/main/azure/local.settings.json to non-production and fill the keyId and publicKey variables with the values found in environments/non-production.yml. This will only give a negative test as any local calling client (postman etc) will be unable to sign its request with the correct key.
To test in the cloud, try the following:
## Should fail with 401
curl --location --request POST 'https://user-account-service-ft2.azurewebsites.net/api/hello' \
--header 'Content-Type: application/json' \
--header 'Authorization: garbages' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Wot oot"
}'
## Should pass with 200
curl --location --request POST 'https://mathdojoio.cloud.tyk.io/user-account-service-np-test/api/hello' \
--header 'Content-Type: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Wot oot"
}'
Purpose
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
By default the verification will not run if the environment name is set to local. To test, change the setting
MATH_DOJO_ENV_NAME
insrc/main/azure/local.settings.json
to non-production and fill the keyId and publicKey variables with the values found inenvironments/non-production.yml
. This will only give a negative test as any local calling client (postman etc) will be unable to sign its request with the correct key.To test in the cloud, try the following:
What to Check
Verify that the following are valid
Other Information