blob: a40223639feb8e93f40dde5b1d2a6824470b8eef (
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
|
@page "/auth"
@model VPNAuth.Server.Pages.Auth
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>VPNAuth - Auth</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<h1>Authorization</h1>
@if (Model.ValidRequest)
{
<div>
<p>Do you want to log into <i>@Request.Query["client_id"]</i> as user <i>@Model.User?.Username</i>?</p>
<p>Requested scopes:</p>
<ul>
@foreach (var scope in Model.RequestEntry!.Entity.Scopes)
{
<li>@scope</li>
}
</ul>
<button class="button primary"
onclick="window.location = '/accept-auth/@Model.RequestEntry?.Entity.Id'">Yes
</button>
<button class="button error"
onclick="window.location = '@(Model.Config.FindApp(Request.Query["client_id"]!)!.RedirectUri
+ "?error=access_denied")'">No</button>
<br/>
</div>
}
else
{
<b>Invalid request.</b>
}
<footer>
<p style="margin-top: 5em;"><a target="_blank" href="https://bytim.eu/projects/VPNAuth/">VPNAuth</a> by Tim</p>
</footer>
</body>
</html>
|