29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
@page "/oauth/authorize"
|
|||
|
|
@model PrivaPub.Web.Pages.OAuth.AuthorizeModel
|
||
|
|
@{
|
||
|
|
ViewData["Title"] = "Authorize";
|
||
|
|
}
|
||
|
|
<header><h1>Authorize @Model.ApplicationName</h1></header>
|
||
|
|
<p>It asks for: <strong>@string.Join(", ", Model.RequestedScopes)</strong>.</p>
|
||
|
|
@if (Model.Avatars.Count == 0)
|
||
|
|
{
|
||
|
|
<p role="alert">This login has no persona yet. Create one first.</p>
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<form method="post">
|
||
|
|
@foreach (var parameter in Model.Parameters)
|
||
|
|
{
|
||
|
|
<input type="hidden" name="@parameter.Key" value="@parameter.Value">
|
||
|
|
}
|
||
|
|
<fieldset>
|
||
|
|
<legend>Act as</legend>
|
||
|
|
@foreach (var avatar in Model.Avatars)
|
||
|
|
{
|
||
|
|
<p><label><input type="radio" name="avatarId" value="@avatar.Id" required @(avatar == Model.Avatars[0] ? "checked" : "")> @avatar.Name <span class="meta">@@@avatar.Handle</span></label></p>
|
||
|
|
}
|
||
|
|
</fieldset>
|
||
|
|
<p class="meta">Each persona is a separate account to the application. Choosing one does not reveal the others.</p>
|
||
|
|
<p><button type="submit" name="decision" value="allow">Allow</button> <button type="submit" name="decision" value="deny">Deny</button></p>
|
||
|
|
</form>
|
||
|
|
}
|