{ "version": "2.0.0", "tasks": [ { "label": "Run authproxy (demo hashes)", "type": "shell", "command": "go run ./cmd/authproxy", "options": { "env": { "AUTH_PROXY_LISTEN_ADDR": ":8080", "AUTH_PROXY_TOKEN_HASHES_DIR": "${workspaceFolder}/demo/token-hashes", "AUTH_PROXY_LOG_LEVEL": "debug" } }, "problemMatcher": [] }, { "label": "Debug authproxy (delve, demo hashes)", "type": "shell", "command": "dlv debug ./cmd/authproxy", "options": { "env": { "AUTH_PROXY_LISTEN_ADDR": ":8080", "AUTH_PROXY_TOKEN_HASHES_DIR": "${workspaceFolder}/demo/token-hashes", "AUTH_PROXY_LOG_LEVEL": "debug" } }, "problemMatcher": [], "presentation": { "reveal": "always", "panel": "shared" } }, { "label": "Check authproxy 200 (demo-token-1)", "type": "shell", "command": "http_code=$(curl -s -o /dev/null -w \"%{http_code}\" -H \"Authorization: Bearer demo-token-1\" http://localhost:8080/) && if [[ \"$http_code\" == \"200\" ]]; then echo \"OK: expected 200, got $http_code\"; else echo \"FAIL: expected 200, got $http_code\"; exit 1; fi", "problemMatcher": [] }, { "label": "Check authproxy 401 (wrong token)", "type": "shell", "command": "http_code=$(curl -s -o /dev/null -w \"%{http_code}\" -H \"Authorization: Bearer wrong\" http://localhost:8080/) && if [[ \"$http_code\" == \"401\" ]]; then echo \"OK: expected 401, got $http_code\"; else echo \"FAIL: expected 401, got $http_code\"; exit 1; fi", "problemMatcher": [] } ] }