scorpiox-bot-plugin-antigravity-login
←mock_token.shbash
14 lines · 612 BHEADBlameDownload
1#!/bin/sh
2# tests/mock_token.sh - stand-in for scorpiox-google-fetchtoken -local.
3#
4# Prints the real payload shape, including a fake bearer token, so the suite can
5# prove the plugin never forwards that token to a browser or a proxy log.
6#
7# Set MOCK_TOKEN_FAIL=1 to exercise the refresh failure path.
8if [ "$MOCK_TOKEN_FAIL" = "1" ]; then
9 printf '{"ok":false,"error":"no refresh_token for account"}\n'
10 exit 1
11fi
12printf 'fetching token (local)\n'
13printf '{"ok":true,"email":"pico@example.com","access_token":"ya29.MOCK-ACCESS-TOKEN-MUST-NOT-LEAK",'
14printf '"project_id":"proj-mock-42","expires_in":3599}\n'