Browse Source

Update the authorization view to hide the resources list when the "resource" parameter is empty

pull/124/head
Kévin Chalet 10 years ago
parent
commit
2329d07939
  1. 11
      src/OpenIddict.Mvc/Views/Shared/Authorize.cshtml
  2. 2
      src/OpenIddict.Mvc/Views/Shared/Logout.cshtml

11
src/OpenIddict.Mvc/Views/Shared/Authorize.cshtml

@ -6,8 +6,11 @@
<div class="jumbotron">
<h1>Authorization</h1>
<p class="lead text-left">Do you wanna grant <strong>@Model.Item2</strong> access to your resources? (scopes requested: @Model.Item1.Scope)</p>
<p class="lead text-left"><strong>@Model.Item2</strong> will be able to access the following endpoints: @string.Join(" ; ", Model.Item1.GetResources())</p>
<p class="lead text-left">Do you want to grant <strong>@Model.Item2</strong> access to your data? (scopes requested: @Model.Item1.Scope)</p>
@if (!string.IsNullOrEmpty(Model.Item1.Resource)) {
<p class="lead text-left"><strong>@Model.Item2</strong> will be able to access the following endpoints: @string.Join(" ; ", Model.Item1.GetResources())</p>
}
<form enctype="application/x-www-form-urlencoded" method="post">
@Html.AntiForgeryToken()
@ -16,7 +19,7 @@
<input type="hidden" name="@parameter.Key" value="@parameter.Value" />
}
<input formaction="@Url.Action("Accept")" class="btn btn-lg btn-success" name="Authorize" type="submit" value="Yeah, sure" />
<input formaction="@Url.Action("Deny")" class="btn btn-lg btn-danger" name="Deny" type="submit" value="Hell, no" />
<input formaction="@Url.Action("Accept")" class="btn btn-lg btn-success" name="Authorize" type="submit" value="Yes" />
<input formaction="@Url.Action("Deny")" class="btn btn-lg btn-danger" name="Deny" type="submit" value="No" />
</form>
</div>

2
src/OpenIddict.Mvc/Views/Shared/Logout.cshtml

@ -13,6 +13,6 @@
<input type="hidden" name="@parameter.Key" value="@parameter.Value" />
}
<input class="btn btn-lg btn-success" name="Authorize" type="submit" value="Yeah, sure" />
<input class="btn btn-lg btn-success" name="Confirm" type="submit" value="Yes" />
</form>
</div>
Loading…
Cancel
Save