2019-10-18 16:42:06 +02:00
|
|
|
@using BTCPayServer.Security.OpenId
|
2019-09-29 09:23:31 +02:00
|
|
|
@using OpenIddict.Abstractions
|
|
|
|
@model BTCPayServer.Models.Authorization.AuthorizeViewModel
|
|
|
|
@{
|
|
|
|
|
|
|
|
var scopeMappings = new Dictionary<string, (string Title, string Description)>()
|
|
|
|
{
|
2019-10-18 16:42:06 +02:00
|
|
|
{BTCPayScopes.StoreManagement, ("Manage your stores", "The app will be able to create, modify and delete all your stores.")},
|
|
|
|
{BTCPayScopes.ServerManagement, ("Manage your server", "The app will have total control on your server")},
|
|
|
|
};
|
2019-09-29 09:23:31 +02:00
|
|
|
}
|
2019-08-29 09:25:16 +02:00
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="request_id" value="@Model.RequestId"/>
|
|
|
|
<section>
|
2019-09-29 09:23:31 +02:00
|
|
|
<div class="card container">
|
2019-08-29 09:25:16 +02:00
|
|
|
<div class="row">
|
2019-11-01 21:55:05 +01:00
|
|
|
<div class="col-lg-12 section-heading">
|
|
|
|
<h2>Authorization Request</h2>
|
2019-08-29 09:25:16 +02:00
|
|
|
<hr class="primary">
|
|
|
|
<p>@Model.ApplicationName is requesting access to your account.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2019-09-29 09:23:31 +02:00
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="list-group list-group-flush">
|
|
|
|
@foreach (var scope in Model.Scope)
|
|
|
|
{
|
|
|
|
@if (scopeMappings.TryGetValue(scope, out var text))
|
|
|
|
{
|
|
|
|
<li class="list-group-item">
|
|
|
|
<h5 class="mb-1">@text.Title</h5>
|
|
|
|
<p class="mb-1">@text.Description.</p>
|
|
|
|
</li>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row mb-2">
|
2019-08-29 09:25:16 +02:00
|
|
|
<div class="col-lg-12 text-center">
|
|
|
|
<div class="btn-group">
|
2019-10-12 13:35:30 +02:00
|
|
|
<button class="btn btn-primary" name="consent" id="consent-yes" type="submit" value="Yes">Authorize app</button>
|
2019-08-29 09:26:34 +02:00
|
|
|
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
2019-08-29 09:25:16 +02:00
|
|
|
<span class="sr-only">Toggle Dropdown</span>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu">
|
|
|
|
<button class="dropdown-item" name="consent" id="consent-yes-temporary" type="submit" value="YesTemporary">Authorize app until session ends</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-10-12 13:35:30 +02:00
|
|
|
<button class="btn btn-secondary" id="consent-no" name="consent" type="submit" value="No">Cancel</button>
|
2019-08-29 09:25:16 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</form>
|