math-dojo / user-account-service

Microservice for managing the users of the math-dojo platform
1 stars 0 forks source link

Ft2 - Secure Endpoints Behind HTTPSignatureVerifier + Add Debug Config #4

Closed noce2cicd closed 4 years ago

noce2cicd commented 4 years ago

Purpose

Does this introduce a breaking change?

[X] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
./mvnw clean package
./mvnw azure-functions:run

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"
}'

What to Check

Verify that the following are valid

Other Information