Add admin page to list and revoke Micropub tokens
Gives a way to actually use the revocation capability built up over the last few commits from the admin side, not just self-service via the client. Lists client_id/scope/issue time per token (never the raw token itself, since only its hash is stored) with a revoke button for active ones. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014625MfkGZ7GVdbqKme4a8L
This commit is contained in:
parent
9c9a6392c8
commit
9d6cf6c815
5 changed files with 159 additions and 0 deletions
27
resources/views/admin/tokens/index.blade.php
Normal file
27
resources/views/admin/tokens/index.blade.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
@extends('master')
|
||||
|
||||
@section('title')List Tokens « Admin CP « @stop
|
||||
|
||||
@section('content')
|
||||
<h1>Micropub Tokens</h1>
|
||||
@if($tokens->isEmpty())
|
||||
<p>No tokens have been issued.</p>
|
||||
@else
|
||||
<ul>
|
||||
@foreach($tokens as $token)
|
||||
<li>
|
||||
{{ $token->client_id }} — scope: {{ $token->scope }} — issued {{ $token->created_at->diffForHumans() }}
|
||||
@if($token->isRevoked)
|
||||
— revoked {{ $token->revoked_at->diffForHumans() }}
|
||||
@else
|
||||
<form action="/admin/tokens/{{ $token->id }}/revoke" method="post" style="display:inline">
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('PUT') }}
|
||||
<button type="submit" name="revoke">Revoke</button>
|
||||
</form>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
@stop
|
||||
Loading…
Reference in a new issue