Skip to main content

DEFAULT_SUCCESS_HTML

Constant DEFAULT_SUCCESS_HTML 

Source
pub const DEFAULT_SUCCESS_HTML: &str = r#"<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Authentication Successful</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: #f4f7f9;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .container {
            background-color: #ffffff;
            padding: 2.5rem;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
            text-align: center;
            max-width: 400px;
            width: 90%;
        }
        .icon {
            background-color: #e6f4ea;
            color: #34a853;
            width: 64px;
            height: 64px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0 auto 1.5rem;
        }
        h1 {
            color: #202124;
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }
        p {
            color: #5f6368;
            line-height: 1.5;
            margin-bottom: 1.5rem;
        }
        .close-hint {
            font-size: 0.875rem;
            color: #9aa0a6;
        }
        .context-info {
            background-color: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            text-align: left;
            font-size: 0.875rem;
        }
        .context-item {
            margin-bottom: 0.5rem;
            color: #374151;
        }
        .context-item:last-child {
            margin-bottom: 0;
        }
        .context-label {
            font-weight: 600;
            color: #111827;
            display: inline-block;
            width: 80px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="icon">
            <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
                <polyline points="20 6 9 17 4 12"></polyline>
            </svg>
        </div>
        <h1>Authentication Successful</h1>
        <p>You have successfully authenticated with <strong>mcp-airlock</strong>. You can now close this tab and return to your application.</p>
        
        <div class="context-info">
            <div class="context-item">
                <span class="context-label">Resource:</span> {{RESOURCE_NAME}}
            </div>
            <div class="context-item">
                <span class="context-label">Identity:</span> {{ISSUER_NAME}}
            </div>
        </div>

        <div class="close-hint">This tab can be safely closed.</div>
    </div>
</body>
</html>
"#;
Expand description

Page shown after a successful login.