fix(paperless-ai): use sed for JWT token extraction (jq not available)

This commit is contained in:
2026-09-14 23:55:53 +09:00
parent ae93c7ca0d
commit dfbe2cc920
+3 -3
View File
@@ -43,10 +43,10 @@ spec:
-d "client_secret=${LLM_AUTH_CLIENT_SECRET}" \
-d "scope=openid llm:inference" 2>/dev/null)
# Extract token using jq
TOKEN=$(echo "$TOKEN_RESPONSE" | jq -r '.access_token')
# Extract token from JSON response using sed
TOKEN=$(echo "$TOKEN_RESPONSE" | sed -n 's/.*"access_token":"\([^"]*\)".*/\1/p')
if [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ]; then
if [ -z "$TOKEN" ]; then
echo "[error] Failed to get token. Response: $TOKEN_RESPONSE"
exit 1
fi