diff --git a/config.template/faf-java-api/faf-java-api.env b/config.template/faf-java-api/faf-java-api.env index 965d49df..06f5d015 100644 --- a/config.template/faf-java-api/faf-java-api.env +++ b/config.template/faf-java-api/faf-java-api.env @@ -4,8 +4,7 @@ AVATAR_IMAGE_HEIGHT=20 AVATAR_IMAGE_WIDTH=40 AVATAR_MAX_SIZE_BYTES=4096 AVATAR_TARGET_DIRECTORY=/content/avatars -ACTIVATION_SUCCESS_REDIRECT_URL=http://localhost:8020/account_activated -ACTIVATION_URL_FORMAT=http://localhost:8010/users/activate?token=%s +ACTIVATION_URL_FORMAT=http://localhost:8020/account/activate?username=%s&token=%s API_PORT=8010 API_PROFILE=dev CHALLONGE_KEY=banana @@ -48,8 +47,7 @@ MOD_TARGET_DIRECTORY=/content/mods MOD_THUMBNAIL_TARGET_DIRECTORY=/content/mods/thumbs PASSWORD_RESET_EMAIL_BODY=Dear {0},\n\na new password was requested for your user.\nIf you did not request a new password, please delete this email.\n\nOtherwise please click on the following link to reset your password:\n-----------------------\n{1}\n-----------------------\n\nThanks,\n-- The FA Forever team" PASSWORD_RESET_EMAIL_SUBJECT=FAForever - Password reset -PASSWORD_RESET_SUCCESS_REDIRECT_URL=http://localhost:8020/password_resetted -PASSWORD_RESET_URL_FORMAT=http://localhost:8010/users/confirmPasswordReset?token=%s +PASSWORD_RESET_URL_FORMAT=http://localhost:8000/account/confirmPasswordReset?username=%s&token=%s REGISTRATION_EMAIL_BODY=Dear {0},\n\nwelcome to the FAForever community.\nPlease visit the following link to activate your FAF account:\n\n-----------------------\n{1}\n-----------------------\n\nThanks,\n-- The FA Forever team REGISTRATION_EMAIL_SUBJECT=FAForever - Account validation REPLAY_DOWNLOAD_URL_FORMAT=http://localhost/replays/%s diff --git a/docker-compose.yml b/docker-compose.yml index 6ea8b9a7..5d4d997c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -224,7 +224,7 @@ services: # faf-java-api: container_name: faf-java-api - image: faforever/faf-java-api:v2.7.12 + image: faforever/faf-java-api:v2.8.0 user: ${FAF_JAVA_API_USER} networks: faf: @@ -268,7 +268,7 @@ services: # faf-website: container_name: faf-website - image: faforever/faf-website:v1.7.12 + image: faforever/faf-website:v1.8.0 user: ${FAF_WEBSITE_USER} restart: unless-stopped env_file: ./config/faf-website/faf-website.env diff --git a/tests/postman-collection.json b/tests/postman-collection.json index 96f96a5f..c63dbb63 100644 --- a/tests/postman-collection.json +++ b/tests/postman-collection.json @@ -47,7 +47,6 @@ "listen": "test", "script": { "id": "5b42d51e-5a51-4785-a3d1-cd5e8a461e2f", - "type": "text/javascript", "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", @@ -56,7 +55,8 @@ "pm.test(\"Body matches string\", function () {", " pm.expect(pm.response.text()).to.include(\"The entered username is already in use: test\");", "});" - ] + ], + "type": "text/javascript" } } ], @@ -81,16 +81,6 @@ "value": "test@test.test", "type": "text" }, - { - "key": "password", - "value": "123456", - "type": "text" - }, - { - "key": "password_confirm", - "value": "123456", - "type": "text" - }, { "key": "tosagree", "value": "on", @@ -129,7 +119,7 @@ "});", "", "pm.test(\"Body matches string\", function () {", - " pm.expect(pm.response.text()).to.include(\"You have activated your account successfully!\");", + " pm.expect(pm.response.text()).to.include(\"Your account was created successfully\");", "});" ], "type": "text/javascript" @@ -137,23 +127,42 @@ } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "password", + "value": "new_password", + "type": "text" + }, + { + "key": "password_confirm", + "value": "new_password", + "type": "text" + } + ] + }, "url": { - "raw": "{{api-url}}/users/activate?token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJsaWZldGltZSI6IjIwNTAtMTItMzFUMTk6MzY6MTguMjIzWiIsImFjdGlvbiI6IlJFR0lTVFJBVElPTiIsInBhc3N3b3JkIjoiOGQ5NjllZWY2ZWNhZDNjMjlhM2E2Mjky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KydnxDCLV0EYBpbN_yGWBlXIuxfF3ivutDGWfrwqOH-g", "host": [ - "{{api-url}}" + "{{website-url}}" ], "path": [ - "users", + "account", "activate" ], "query": [ + { + "key": "username", + "value": "new_user" + }, { "key": "token", "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJsaWZldGltZSI6IjIwNTAtMTItMzFUMTk6MzY6MTguMjIzWiIsImFjdGlvbiI6IlJFR0lTVFJBVElPTiIsInBhc3N3b3JkIjoiOGQ5NjllZWY2ZWNhZDNjMjlhM2E2MjkyODBlNjg2Y2YwYzNmNWQ1YTg2YWZmM2NhMTIwMjBjOTIzYWRjNmM5MiIsImVtYWlsIjoibmV3QHVzZXIuZW1haWwiLCJ1c2VybmFtZSI6Im5ld191c2VyIn0.A0Ue-8XfE6xVwvzi6rgtg1wV7RmScXF-7XBEJ8ofbpgviPs6FvEBPh9pxTBsYB1VHRLgMi443N3UKBBUzz50xLo00-uelWbaVgZuVsF6hQECfI5nLh1DdePmHLNUmwISkymAn6tPq-4TYsCJGOG4Ofg_gAV-AKrKPKTpONU3XlcksYXQgXu24hAislShGdTM_jVmBSW3e2g9Ca1x24j1sYsGqLyOzfd-U3bzYee3QvQIDpyAycJZCC-e2Zj020SZ_cyWK7WvEVXb5KGzIl0x9tor134Tsw_0aTBqeAcjDtKydnxDCLV0EYBpbN_yGWBlXIuxfF3ivutDGWfrwqOH-g"