Files
gitea-mcp-forward-auth/.vscode/tasks.json
T
torben 3cb559ffbc
Build and Test / verify (push) Successful in 34s
Build and Push Container Image / build-and-push-image (push) Successful in 1m35s
Add VS Code configuration files and demo token hashes for local testing
2026-07-12 14:59:34 +02:00

47 lines
1.6 KiB
JSON

{
"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": []
}
]
}