summaryrefslogtreecommitdiff
path: root/VPNAuth.Server/Pages/Auth.cshtml
blob: 5ac8efe755dd6576d6ec6f4ba120aca532d132e4 (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
@page "/auth"
@model VPNAuth.Server.Pages.Auth

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>VPNAuth - Auth</title>
</head>
<body style="text-align: center;">
    <h1>Authorization</h1>
    <h2>VPNAuth</h2>
    @if (Model.ValidRequest)
    {
        <div>
            <p>Do you want to log into <i>@Request.Query["client_id"]</i>?</p>
            <button onclick="window.location = '/accept-auth/@Model.RequestEntry?.Entity.Id'">Yes</button>
            <br/>
            <p>You are logged in as <i>@Model.User?.Username</i>.</p>
        </div>
    }
    else
    {
        <b>Invalid request.</b>
    }
</body>
</html>