-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1499 from DuendeSoftware/brock/update-aspid-host
more host UI updates to keep the main host and AspId host in sync
- Loading branch information
Showing
29 changed files
with
949 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@page | ||
@model IdentityServerHost.Pages.Ciba.AllModel | ||
@{ | ||
} | ||
|
||
<div class="ciba-page"> | ||
<div class="row"> | ||
<div class="col"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<h2>Pending Backchannel Login Requests</h2> | ||
</div> | ||
<div class="card-body"> | ||
@if (Model.Logins.Any()) | ||
{ | ||
<table class="table table-bordered table-striped table-sm"> | ||
<thead> | ||
<tr> | ||
<th>Id</th> | ||
<th>Client Id</th> | ||
<th>Binding Message</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach (var login in Model.Logins) | ||
{ | ||
<tr> | ||
<td>@login.InternalId</td> | ||
<td>@login.Client.ClientId</td> | ||
<td>@login.BindingMessage</td> | ||
<td> | ||
<a asp-page="Consent" asp-route-id="@login.InternalId" class="btn btn-primary">Process</a> | ||
</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
} | ||
else | ||
{ | ||
<div>No Pending Login Requests</div> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) Duende Software. All rights reserved. | ||
// See LICENSE in the project root for license information. | ||
|
||
using Duende.IdentityServer.Models; | ||
using Duende.IdentityServer.Services; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace IdentityServerHost.Pages.Ciba; | ||
|
||
[SecurityHeaders] | ||
[Authorize] | ||
public class AllModel : PageModel | ||
{ | ||
public IEnumerable<BackchannelUserLoginRequest> Logins { get; set; } = default!; | ||
|
||
private readonly IBackchannelAuthenticationInteractionService _backchannelAuthenticationInteraction; | ||
|
||
public AllModel(IBackchannelAuthenticationInteractionService backchannelAuthenticationInteractionService) | ||
{ | ||
_backchannelAuthenticationInteraction = backchannelAuthenticationInteractionService; | ||
} | ||
|
||
public async Task OnGet() | ||
{ | ||
Logins = await _backchannelAuthenticationInteraction.GetPendingLoginRequestsForCurrentUserAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
@page | ||
@model IdentityServerHost.Pages.Ciba.Consent | ||
@{ | ||
} | ||
|
||
<div class="ciba-consent"> | ||
<div class="lead"> | ||
@if (Model.View.ClientLogoUrl != null) | ||
{ | ||
<div class="client-logo"><img src="@Model.View.ClientLogoUrl"></div> | ||
} | ||
<h1> | ||
@Model.View.ClientName | ||
<small class="text-muted">is requesting your permission</small> | ||
</h1> | ||
|
||
<h3>Verify that this identifier matches what the client is displaying: <em class="text-primary">@Model.View.BindingMessage</em></h3> | ||
|
||
<p>Uncheck the permissions you do not wish to grant.</p> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-sm-8"> | ||
<partial name="_ValidationSummary" /> | ||
</div> | ||
</div> | ||
|
||
<form asp-page="/Ciba/Consent"> | ||
<input type="hidden" asp-for="Input.Id" /> | ||
<div class="row"> | ||
<div class="col-sm-8"> | ||
@if (Model.View.IdentityScopes.Any()) | ||
{ | ||
<div class="form-group"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<span class="glyphicon glyphicon-user"></span> | ||
Personal Information | ||
</div> | ||
<ul class="list-group list-group-flush"> | ||
@foreach (var scope in Model.View.IdentityScopes) | ||
{ | ||
<partial name="_ScopeListItem" model="@scope" /> | ||
} | ||
</ul> | ||
</div> | ||
</div> | ||
} | ||
|
||
@if (Model.View.ApiScopes.Any()) | ||
{ | ||
<div class="form-group"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<span class="glyphicon glyphicon-tasks"></span> | ||
Application Access | ||
</div> | ||
<ul class="list-group list-group-flush"> | ||
@foreach (var scope in Model.View.ApiScopes) | ||
{ | ||
<partial name="_ScopeListItem" model="scope" /> | ||
} | ||
</ul> | ||
</div> | ||
</div> | ||
} | ||
|
||
<div class="form-group"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<span class="glyphicon glyphicon-pencil"></span> | ||
Description | ||
</div> | ||
<div class="card-body"> | ||
<input class="form-control" placeholder="Description or name of device" asp-for="Input.Description" autofocus> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-sm-4"> | ||
<button name="Input.button" value="yes" class="btn btn-primary" autofocus>Yes, Allow</button> | ||
<button name="Input.button" value="no" class="btn btn-secondary">No, Do Not Allow</button> | ||
</div> | ||
<div class="col-sm-4 col-lg-auto"> | ||
@if (Model.View.ClientUrl != null) | ||
{ | ||
<a class="btn btn-outline-info" href="@Model.View.ClientUrl"> | ||
<span class="glyphicon glyphicon-info-sign"></span> | ||
<strong>@Model.View.ClientName</strong> | ||
</a> | ||
} | ||
</div> | ||
</div> | ||
</form> | ||
</div> |
Oops, something went wrong.