This commit is contained in:
Paul Schneider 2026-02-28 21:17:54 +00:00
commit 40e8e08690
3487 changed files with 39 additions and 21 deletions

View file

@ -0,0 +1,28 @@
@using System.Security.Claims
@model AuthorisationView
@{
ViewBag.Title = "Authorize";
}
<h1>Authorization Server</h1>
<h2>OAuth2 Authorize</h2>
<form method="POST">
<p>Hello, @User.Identity.Name</p>
<p>@Model.Message</p>
<p>A third party application want to do the following on your behalf:</p>
<ul>
@if (Model.Scopes!=null) {
@foreach (var scope in Model.Scopes)
{
<li><em>@scope.Id</em>: @scope.Description</li>
}
}
</ul>
<p>
<input type="submit" class="btn btn-light btn-success" name="submit.Grant" value="Grant" />
<input type="submit" class="btn btn-light btn-danger" name="submit.Deny" value="Deny" />
<input type="submit" class="btn btn-light btn-success" name="submit.Login" value="Sign in as different user" />
</p>
</form>

View file

@ -0,0 +1,16 @@
@using System
@using System.Security.Claims
@{
var error = Context.Items["oauth.Error"];
var errorDescription = Context.Items["oauth.ErrorDescription"];
var errorUri = Context.Items["oauth.ErrorUri"];
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Authorization Denied</title>
</head>
<body>
<h1>Authorization denied</h1>
</body>
</html>

View file

@ -0,0 +1,20 @@

@using System
@using System.Security.Claims
@{
var error = Context.Items["oauth.Error"];
var errorDescription = Context.Items["oauth.ErrorDescription"];
var errorUri = Context.Items["oauth.ErrorUri"];
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Authorize Error</title>
</head>
<body>
<h1>Identification & Authentication server</h1>
<h2>OAuth2 Authorize Error</h2>
<p>Error: @error</p>
<p>@errorDescription</p>
</body>
</html>