|
| 1 | +<div class="profile-page"> |
| 2 | + <p-card class="profile-header-card"> |
| 3 | + <div class="profile-header"> |
| 4 | + <div class="profile-header__title"> |
| 5 | + <h2>User Profile & Security</h2> |
| 6 | + <p>Identity claims, roles, active session health, and security posture for this account.</p> |
| 7 | + <div class="profile-header__meta"> |
| 8 | + <span class="meta-pill"> |
| 9 | + <i class="pi pi-user"></i> |
| 10 | + {{ userDisplayName() }} |
| 11 | + </span> |
| 12 | + <span class="meta-pill"> |
| 13 | + <i class="pi pi-envelope"></i> |
| 14 | + {{ userEmail() }} |
| 15 | + </span> |
| 16 | + <span class="meta-pill" *ngIf="isDebugSession"> |
| 17 | + <i class="pi pi-eye"></i> |
| 18 | + Debug session |
| 19 | + </span> |
| 20 | + </div> |
| 21 | + </div> |
| 22 | + |
| 23 | + <div class="profile-header__actions"> |
| 24 | + <button pButton type="button" label="Create Account" icon="pi pi-user-plus" class="p-button-outlined" (click)="register()"></button> |
| 25 | + <button pButton type="button" label="Logout" icon="pi pi-sign-out" class="p-button-outlined" (click)="logout()"></button> |
| 26 | + </div> |
| 27 | + </div> |
| 28 | + </p-card> |
| 29 | + |
| 30 | + <div class="profile-kpis"> |
| 31 | + <div class="profile-kpis__item"> |
| 32 | + <p-card class="kpi-card"><span class="kpi-card__label">User Id</span><span class="kpi-card__value kpi-card__value--small">{{ currentUserId() || '-' }}</span></p-card> |
| 33 | + </div> |
| 34 | + <div class="profile-kpis__item"> |
| 35 | + <p-card class="kpi-card"><span class="kpi-card__label">Roles</span><span class="kpi-card__value">{{ roles().length }}</span></p-card> |
| 36 | + </div> |
| 37 | + <div class="profile-kpis__item"> |
| 38 | + <p-card class="kpi-card"><span class="kpi-card__label">Scopes</span><span class="kpi-card__value">{{ scopes().length }}</span></p-card> |
| 39 | + </div> |
| 40 | + <div class="profile-kpis__item"> |
| 41 | + <p-card class="kpi-card"><span class="kpi-card__label">Expires In</span><span class="kpi-card__value">{{ expiresInMinutes() }}m</span></p-card> |
| 42 | + </div> |
| 43 | + </div> |
| 44 | + |
| 45 | + <div class="profile-grid"> |
| 46 | + <div class="profile-grid__col profile-grid__col--roles"> |
| 47 | + <p-card header="Role Membership" styleClass="profile-panel-card"> |
| 48 | + <div class="roles-list" *ngIf="roles().length > 0; else noRolesState"> |
| 49 | + <div class="role-item" *ngFor="let role of roles()"> |
| 50 | + <div class="role-item__head"> |
| 51 | + <span class="role-item__name">{{ role }}</span> |
| 52 | + </div> |
| 53 | + <p class="role-item__description">{{ getRoleDescription(role) }}</p> |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + </p-card> |
| 57 | + </div> |
| 58 | + |
| 59 | + <div class="profile-grid__col profile-grid__col--session"> |
| 60 | + <p-card header="Session Details" styleClass="profile-panel-card"> |
| 61 | + <div class="session-details"> |
| 62 | + <div class="session-item"><span>Token Type</span><strong>{{ tokenType }}</strong></div> |
| 63 | + <div class="session-item"><span>Expires At</span><strong>{{ expiresAt() ? (expiresAt() | date:'medium') : '-' }}</strong></div> |
| 64 | + <div class="session-item"><span>Debug Session</span><strong>{{ isDebugSession ? 'Yes' : 'No' }}</strong></div> |
| 65 | + </div> |
| 66 | + </p-card> |
| 67 | + </div> |
| 68 | + |
| 69 | + <div class="profile-grid__col profile-grid__col--security"> |
| 70 | + <p-card header="Security Notes" styleClass="profile-panel-card"> |
| 71 | + <ul class="security-list"> |
| 72 | + <li *ngFor="let item of securityChecklist">{{ item }}</li> |
| 73 | + </ul> |
| 74 | + </p-card> |
| 75 | + </div> |
| 76 | + |
| 77 | + <div class="profile-grid__col profile-grid__col--claims"> |
| 78 | + <p-card header="Identity Claims" styleClass="profile-panel-card"> |
| 79 | + <p-table [value]="claimRows()" [rows]="8" [paginator]="claimRows().length > 8" [rowsPerPageOptions]="[8, 16, 30]" [scrollable]="true" scrollHeight="22rem"> |
| 80 | + <ng-template pTemplate="header"> |
| 81 | + <tr> |
| 82 | + <th style="width: 30%;">Claim</th> |
| 83 | + <th>Value</th> |
| 84 | + </tr> |
| 85 | + </ng-template> |
| 86 | + |
| 87 | + <ng-template pTemplate="body" let-claim> |
| 88 | + <tr> |
| 89 | + <td><code>{{ claim.key }}</code></td> |
| 90 | + <td class="claim-value">{{ claim.value }}</td> |
| 91 | + </tr> |
| 92 | + </ng-template> |
| 93 | + |
| 94 | + <ng-template pTemplate="emptymessage"> |
| 95 | + <tr> |
| 96 | + <td colspan="2" class="empty-cell"> |
| 97 | + <div class="empty-state"> |
| 98 | + <i class="pi pi-id-card"></i> |
| 99 | + <p>No claims available for this session.</p> |
| 100 | + </div> |
| 101 | + </td> |
| 102 | + </tr> |
| 103 | + </ng-template> |
| 104 | + </p-table> |
| 105 | + </p-card> |
| 106 | + </div> |
| 107 | + </div> |
| 108 | +</div> |
| 109 | + |
| 110 | +<ng-template #noRolesState> |
| 111 | + <div class="empty-state"> |
| 112 | + <i class="pi pi-users"></i> |
| 113 | + <p>No role claims present in the current token.</p> |
| 114 | + </div> |
| 115 | +</ng-template> |
0 commit comments