src/Hx.IdentityServer/Views/Grants/Index.cshtml

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

@model Hx.IdentityServer.Model.Grants.GrantsViewModel
@{ 
    ViewBag.Active = "grants";
}
<div class="grants-page">
    <div class="lead">
        <h1>Client Application Permissions</h1>
        <p>Below is the list of applications you have given permission to and the resources they have access to.</p>
    </div>

    @if (Model.Grants.Any() == false)
    {
        <div class="row">
            <div class="col-sm-8">
                <div class="alert alert-info">
                    You have not given access to any applications
                </div>
            </div>
        </div>
    }
    else
    {
        foreach (var grant in Model.Grants)
        {
            <div class="card">
                <div class="card-header">
                    <div class="row">
                        <div class="col-sm-8 card-title">
                            @if (grant.ClientLogoUrl != null)
                            {
                                <img src="@grant.ClientLogoUrl">
                            }
                            <strong>@grant.ClientName</strong>
                        </div>

                        <div class="col-sm-2">
                            <form asp-action="Revoke">
                                <input type="hidden" name="clientId" value="@grant.ClientId">
                                <button class="btn btn-danger">Revoke Access</button>
                            </form>
                        </div>
                    </div>
                </div>
                
                <ul class="list-group list-group-flush">
                    @if (grant.Description != null)
                    {
                        <li class="list-group-item">
                            <label>Description:</label> @grant.Description
                        </li>   
                    }
                    <li class="list-group-item">
                        <label>Created:</label> @grant.Created.ToString("yyyy-MM-dd")
                    </li>
                    @if (grant.Expires.HasValue)
                    {
                        <li class="list-group-item">
                            <label>Expires:</label> @grant.Expires.Value.ToString("yyyy-MM-dd")
                        </li>
                    }
后面还有 29 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。