summaryrefslogtreecommitdiff
path: root/web/templates/agent-request.html
blob: fee5ca4334a2acf29c54db69f92b1d389e4fadb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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>