Browse Source

Add a custom Error view in the Mvc.Server sample

pull/31/head
Kévin Chalet 10 years ago
parent
commit
9181a5161c
  1. 12
      samples/Mvc.Server/Views/OpenIddict/Error.cshtml
  2. 2
      src/OpenIddict.Mvc/Views/Shared/Authorize.cshtml

12
samples/Mvc.Server/Views/OpenIddict/Error.cshtml

@ -0,0 +1,12 @@
@using Microsoft.IdentityModel.Protocols.OpenIdConnect
@model OpenIdConnectMessage
<div class="jumbotron">
<h2>Ooooops, something went really bad with your OpenID Connect request! :(</h2>
<p class="lead text-left">
<strong>@Model.Error</strong>
@if (!string.IsNullOrEmpty(Model.ErrorDescription)) {
<small>@Model.ErrorDescription</small>
}
</p>
</div>

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

@ -6,7 +6,7 @@
<div class="jumbotron">
<h1>Authorization</h1>
<p class="lead text-left">Do you wanna grant <strong>@Model.Item2</strong> an access to your resources? (scopes requested: @Model.Item1.Scope)</p>
<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>
<form enctype="application/x-www-form-urlencoded" method="post">

Loading…
Cancel
Save