diff options
Diffstat (limited to 'web/templates/agent-request.html')
| -rw-r--r-- | web/templates/agent-request.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/web/templates/agent-request.html b/web/templates/agent-request.html new file mode 100644 index 0000000..fee5ca4 --- /dev/null +++ b/web/templates/agent-request.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Agent Auth Request - {{.AgentName}}</title> + <style> + body { font-family: system-ui, sans-serif; max-width: 600px; margin: 40px auto; padding: 20px; background: #1a1a2e; color: #eee; } + .card { background: #16213e; border-radius: 8px; padding: 24px; margin-bottom: 20px; } + h1 { color: #e94560; margin-top: 0; } + .label { color: #888; font-size: 0.9em; margin-bottom: 4px; } + .value { font-family: monospace; background: #0f0f23; padding: 8px 12px; border-radius: 4px; word-break: break-all; margin-bottom: 16px; } + .status { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 0.9em; } + .status-pending { background: #ffc107; color: #000; } + .instructions { background: #1a1a2e; border: 1px solid #333; border-radius: 4px; padding: 16px; font-size: 0.9em; } + .instructions ol { margin: 0; padding-left: 20px; } + .instructions li { margin-bottom: 8px; } + code { background: #0f0f23; padding: 2px 6px; border-radius: 3px; } + </style> +</head> +<body> + <script type="application/json" id="agent-data"> +{ + "request_token": "{{.RequestToken}}", + "status": "{{.Status}}", + "poll_url": "{{.PollURL}}", + "expires_at": "{{.ExpiresAt}}", + "agent_name": "{{.AgentName}}", + "agent_id": "{{.AgentID}}" +} + </script> + + <div class="card"> + <h1>Agent Authentication Request</h1> + <p>Agent <strong>{{.AgentName}}</strong> is requesting access to your dashboard.</p> + + <div class="label">Status</div> + <div><span class="status status-pending">{{.Status}}</span></div> + <br> + + <div class="label">Request Token</div> + <div class="value">{{.RequestToken}}</div> + + <div class="label">Poll URL</div> + <div class="value">{{.PollURL}}</div> + + <div class="label">Expires At</div> + <div class="value">{{.ExpiresAt}}</div> + </div> + + <div class="instructions"> + <strong>Next Steps:</strong> + <ol> + <li>Wait for human approval on the dashboard</li> + <li>Poll the status URL: <code>GET {{.PollURL}}</code></li> + <li>When status is "approved", extract the session token from the response</li> + <li>Use the context URL to fetch your timeline data</li> + </ol> + </div> +</body> +</html> |
